Skip to content

AT15-TestNG/WordPress-API

Repository files navigation

WordPress Pipeline Quality Gate Status

WordPress API v2 Testing Framework

This framework was implemented to test the WordPress API with the WordPress REST API Authentication enabled, running in an AWS server.

Software Under Test (SUT)

WordPress API Docs

Dependencies

Getting Started

Before to run this project you need the following tools installed on your machine:

Clone the repository and open it in your IDE.

Commands

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"

Code Inspection

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

Continuous Integration Pipeline

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.

About

This framework was created with educative purposes and is part of AT15 API Testing subject, and was implemented by: