API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. This API framework is developed using REST Assured and Cucumber. REST Assured is a Java library that provides a domain-specific language (DSL) for writing powerful, maintainable tests for RESTful APIs. Cucumber is an open source library, which supports behavior driven development. To be more precise, Cucumber can be defined as a testing framework, driven by plain English text. It serves as documentation, automated tests, and a development aid – all in one.
For Demo purpose all the test cases are done on Restful-booker.
- It generates Extent report with all the step details. Report will be generated both HTML & PDF file format.
- Generates execution logs, with detailed request and response details.
- Feature file has examples of reading request details from json and excel file.
- This also has an example to validate response body using json schema and java pojo classes.
- Test execution can be triggered form command line.
- Easy integration to CI/CD pipeline.
- Java should be installed and configured.
- Maven should be installed and configured.
- Download the files from Git repository either as zip file OR using Git.
Open the command prompt and navigate to the folder in which pom.xml file is present. Run the below Maven command.
mvn clean test
Once the execution completes report & log will be generated in below folder.
Report: target/report
Log: target/logs