This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.hulagabal.rest</groupId> | |
<artifactId>com.hulagabal.rest</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencies> | |
<!-- https://mvnrepository.com/artifact/io.rest-assured/rest-assured --> | |
<dependency> | |
<groupId>io.rest-assured</groupId> | |
<artifactId>rest-assured</artifactId> | |
<version>3.0.2</version> | |
<scope>test</scope> | |
</dependency> | |
<!-- used to parse Json Document --> | |
<dependency> | |
<groupId>io.rest-assured</groupId> | |
<artifactId>json-path</artifactId> | |
<version>3.0.2</version> | |
</dependency> | |
<!-- to validate that a JSON response conforms to a Json Schema --> | |
<dependency> | |
<groupId>io.rest-assured</groupId> | |
<artifactId>json-schema-validator</artifactId> | |
<version>3.0.2</version> | |
</dependency> | |
<!-- used to parse xml document --> | |
<dependency> | |
<groupId>io.rest-assured</groupId> | |
<artifactId>xml-path</artifactId> | |
<version>3.0.2</version> | |
</dependency> | |
<!-- junit/testng can be used --> | |
<dependency> | |
<groupId>org.testng</groupId> | |
<artifactId>testng</artifactId> | |
<version>6.10</version> | |
</dependency> | |
<dependency> | |
<groupId>org.hamcrest</groupId> | |
<artifactId>java-hamcrest</artifactId> | |
<version>2.0.0.0</version> | |
</dependency> | |
</dependencies> | |
</project> | |
//imports | |
import static io.restassured.RestAssured.*; | |
import static org.hamcrest.Matchers.*; | |
import org.testng.Assert; | |
import org.testng.annotations.Test; | |
import io.restassured.http.ContentType; | |
import io.restassured.http.Cookie; | |
import io.restassured.http.Header; | |
import io.restassured.http.Headers; | |
import io.restassured.internal.path.json.mapping.JsonObjectDeserializer; | |
import io.restassured.response.Response; | |
import io.restassured.response.ResponseBody; | |
import io.restassured.response.ValidatableResponse; | |
import io.restassured.config.RestAssuredConfig; | |
import io.restassured.config.XmlConfig; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.TimeUnit; | |
import org.hamcrest.Matcher; | |
import io.restassured.matcher.ResponseAwareMatcher; | |
import io.restassured.matcher.RestAssuredMatchers.*; | |
import io.restassured.matcher.ResponseAwareMatcherComposer.*; | |
import io.restassured.builder.ResponseSpecBuilder; | |
import io.restassured.specification.ResponseSpecification; | |
import io.restassured.builder.RequestSpecBuilder; | |
import io.restassured.specification.RequestSpecification; | |
import io.restassured.mapper.ObjectMapperType; | |
import static io.restassured.path.json.JsonPath.*; | |
import io.restassured.http.ContentType; | |
import io.restassured.path.json.JsonPath; | |
import io.restassured.path.xml.XmlPath; | |
import static org.hamcrest.Matchers.*; |
No comments:
Post a Comment