This framework was implemented to test the WordPress API with the WordPress REST API Authentication enabled, running in an AWS server.
Before to run this project you need the following tools installed on your machine:
- Git
- Java version >= 16
- An IDE (e.g. IntelliJ IDEA)
Clone the repository and open it in your IDE.
To run the tests with a specific tag, you can use the following command:
$ gradle clean executeFeatures -PenvId="QA01" -PcucumberOptions="@Tag"
You can also run the tests with a specific tag and a specific feature:
$ gradle clean executeFeatures -PenvId="QA01" -PcucumberOptions="@Tag and @Feature"
Or you can run the tests with a specific tag and a specific scenario:
$ gradle clean executeFeatures -PenvId="QA01" -PcucumberOptions="@Tag and @Scenario"
Run the following command to run regression tests:
$ gradle clean executeFeatures -PenvId="QA01" -PcucumberOptions="@Regression and not @Bug"
To ensure the quality of the code, It was used a static analysis tool Sonarcloud. This is part of the Continuous Integration process, and it is run every time new code is pushed in any branch of this repository. If you want to run sonarqube analysis locally, firstly you need to configure SONAR_TOKEN as an environment variable in your system. After that, run the following command:
$ ./gradlew sonarqube
CI pipeline is written in GitHub Actions, and it is used to run the tests, analyze the code quality in Sonarcloud, generate the reports and publish the reports on GitHub pages.
This framework was created with educative purposes and is part of AT15 API Testing subject, and was implemented by: