Demo project for API testing with Java, Maven and REST-Assured
This small Java project show-cases a test automation implementation for testing of REST API's based on REST-Assured testing library and Maven.
This implementation encompases several basic test-cases testing the weather forecast functionalities of a small open online API's at https://api.openweathermap.org/.
Among the assertions you can see various types to API testing, like:
- smoke - checking response codes;
- performance - checking response times;
- contract - verifying correct API schema and data types
- data - testing if data in the response is as expected.
- Java (I used Java
24.0.2) - Maven (I used
3.9.11) - Git
- Docker - if you would like to run it in Docker
- Checkout this project from Git
- Install dependencies by running
mvn install -DskipTests. - You can run tests in the CLI mode with
mvn test - Or run it in Docker with
docker-compose up api-tests