Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2
What is API Testing ?
3
Why API Automation Required ?
Language Independent
Time Effective
Fast Result
4
What is Rest Assured framework ?
REST Assured framework is a simple Java library for testing of REST services.
Integrates seamlessly with existing Java based testing frameworks
5
Why need of Rest Assured framework ?
It remove need of writing a lot of code required to set up an HTTP connection, send
a request and receive and parse a response
Easily be integrated with user Report like Extent report, Allure framework etc.
It gives the method http and send it over network with validating status code 6
request with response correctly as compare to SOAP its light weight and secure.
Tools used in API Framework
Rest Assured
Eclipse
MAVEN
Test NG
Allure Report
7
Implementation process…. Framework
GETTING STARTED WITH REST ASSURED:-
given()
.body("{ \"id\": " + inputId + ", \"quantity\": 1}")
.header("Content-Type", "application/json")
.when().post(environment + "/store/order")
.then().assertThat().statusCode(200);
8
Response codes framework used…
REST API must always return an appropriate status code to the client so that the client can know the actual issue and process accordingly.
Below mentioned are the standard status codes, used in HTTP responses.
200 OK
201 Created
204 No Content
401 Unauthorized
403 Forbidden
Advantage
Easy to use.
Open source.
Light weight.
Faster Executions.
High Reusability – keyword driven approach, same keywords can be used across project
Unified Solution - supporting both Web Application and Mobile Application Automation
@Annotations like using in report are @Title , @Description, @Step, Attachments, @Epic, @Feature,
10
@Story, @step and @Severity.
Thank You…
11