REST Assured
​
Introduction To REST API Testing
​
​
Configure Eclipse With REST Assured
​
​
​
​
​
​
​
Configure Eclipse With REST Assured
​
​
How To Configure Eclipse With REST Assured ?
​
To configure eclipse with REST Assured,we need below mentioned prerequisites :
-
Latest Java version.
-
Working Eclipse IDE.
-
TestNG Setup(Optional).
​
Follow these links to setup above mentioned requirements on your system :
​
​
​
​
Once these are done successfully we can proceed with the Rest Assured set up on Eclipse.
To set up this,we need to download the Rest Assured jars and then add them in our project.
There are mutltiple ways to set up Rest Assured and here we are moving ahead with a method of adding Rest Assured jars using Maven dependencies.
​
REST Assured SetUp Using Maven In Eclipse
​
​
​
-
Add Rest Assured Dependencies from Maven Repositories :
Go to maven repository : link https://mvnrepository.com/
Search for 'REST Assured'.
Copy its corresponding dependencies and paste it in pom.xml of your project.
​
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.4.0</version>
<scope>test</scope>
</dependency>
​
​
Here is a complete pom.xml sample for REST Assured :
​
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>apitesting.examples</groupId>
<artifactId>RESTAssuredAPITesting</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
​
​
​
​
Refer next page API Automation Test Example