- 🔰 Caso você queira ler esse artigo em Português, clique aqui.
This project uses the public The Cat API - Cats as a Service to demonstrate how the RestAssured library can be used together with other Technologies such as Maven, JUnit and AWS.
- ♨️ Java
- 🎮 REST-assured
- 👾 JUnit
- 🎁 Maven
- 🔒 AWS Parameter Store
To use The Cat API it is necessary that we have the api key. We need to create an account and after that an email will be sent containing the api key.
This project is using the AWS Parameter Store service to securely manage our api key.
If you want to use the AWS Parameter Store you will only need to configure your AWS account directly on the machine used and create a Parameter of type SecureString with the name of CatAPI_Token and containing the value of your CatAPI api key .
If the goal is not to use the AWS Parameter Store, just access the src/main/java/header/HeaderCreator.java file and follow the instructions that are presented.
To run all the tests contained within the project, it is only necessary to run the maven test command:
mvn test
If the goal is to run just a specific test class, you can use the -Dtest
parameter to select the class:
mvn test -Dtest=VotesTest
The files needed to generate the Allure report are being saved in the path target/allure-results, this setting is defined inside the Allure .properties file which is located in src/test/resources/allure .properties within the project.
allure.results.directory=target/allure-results
After running the automated tests, you only need to run the command below for the report to be created and opened automatically using your default browser:
allure serve target/allure-results