Api automation framework built via using Rest Assured + Allure report + Wiremock + Log4j . Please go through mentioned URL for more Info -- https://navsinghoberoi.github.io/RestApiAutomation/
This project demonstrates api automation via Rest-Assured library + Allure Reporting. Wiremock is used to mocking api response. Also, Lombok is used to remove need of writing the boilerplate code.
Below mentioned instructions will get you a copy of the project up and running on your local machine for testing purposes.
IntelliJ Idea
Java 8
TestNG
Allure
Please clone the repo using below mentioned link :
https://github.com/navsinghoberoi/RestApiAutomation
To run the testcases, execute following command :
mvn clean test -DsuiteXmlFile=TestNG.xml | tee src/test/java/TestLogs/logging.log | grep -A10 “DEBUG curl”
Run the following commands :
allure generate allure-results
NOTE : Copy the history folder from your previous allure-report folder inside your current allure-results folder in order to see History trend in the report.
allure serve allure-results
Rest Assured
Java
Maven
Git
TestNG
WireMock
Lombok
Allure
Log4j
Curl-Logger
Navpreet Singh
Remember below mentioned points before creating new api tests –>
a) Add new GET method tests –>
To add tests, go to RestApiAutomation/src/test/java/Tests/ZipCodeApi_GetRequestTests folder and create a new file
b) Add new POST method tests –>
To add tests, go to RestApiAutomation/src/test/java/Tests/ZipCodeApi_PostRequestTests folder and create a new file