This is sample test for SWAPI api using rest Assured with Java, and using different assertions validations, and the use of POJOS in java native. This repository is to make request to SWAPI API. All the data is accessible through HTTP web API. https://swapi.dev
REST-assured is a very popular tool in the API automation testing world working in the Java domain.
Pros:
The RESTassured is an open-source tool.
REST assured minimizes the use of code for its REST services, giving flexibility to the user.
Additionally, it also supports BDD Given/When/Then syntax.
REST assured is quite popular among Java programmers and enables them to automate the tests quickly using Java.
REST assured is also a primary choice for the testers focussing on Serenity Framework and combine UI and generate the reports easily.
Cons: Supports only Java programming language.
- src > test > java > DescerializationWithPojos: Contains getters and setters
- src > test > java > EndToEndTests: Contains end to end test
- src > test > java > restAssuredSwapi: Contains other specific tests
- pom.xml File that contains the dependencies, and is used with maven
Clone, download or fork the project and open in your favorite IDE.
Then ctrl+shift+f10 to execute class you are interested to run