"Testing leads to failure, and failure leads to understanding" - Burt Rutan
π©βπ»Test automation project for REQRES.IN service
- The process of automatically testing and verifying the functionality of an application programming interface (API) is known as API automation.
- It helps ensure that the API functions as intended and reduces the time and effort spent on manual testing.
- API automation is implemented using software tools that send requests to the API, parse the responses, and compare them to the expected results.
- The goal of API automation is to increase the reliability and consistency of the testing process, which saves time and resources.
- REST API stands for Representational State Transfer API, which is a web standards-based architecture for building web services.
- REST API is a common way of communication between clients and servers over the Internet. REST APIs use HTTP requests to manipulate data, such as POST, PUT, GET, and DELETE.
- Tools and technologies
- List of implemented API tests
- Running autotests from the terminal
- Build in Jenkins
- Allure report
- Allure TestOps
- Integration with Jira
- Telegram notifications using a bot
| IntelliJ IDEA | Java | Rest Assured | Allure Report | Allure TestOps | Gradle | JUnit5 | GitHub | Jenkins | Telegram | Jira |
|---|---|---|---|---|---|---|---|---|---|---|
| |
![]() |
|
|
|
|
|
|
- To create autotests in this project the
Javalanguage was used. Gradlewas used as an automatic build system.- Framework
JUnit5for automated unit testing has been applied. - The models of the received data are described using the
Lomboklibrary. - API testing is done using the
Rest Assuredlibrary. This library helps identify and fix bugs and issues early in the development process. - To run tests remotely a job was implemented in
Jenkinswith the creation of anAllure-reportand sending the results toTelegramusing special Telegram bot. - Integrations with Ρ
Allure TestOpsandJirawere implemented.
| CODE | STATUS | MEANING |
|---|---|---|
200 |
OK | The request succeeded |
201 |
Created | The request succeeded, and a new resource was created as a result |
204 |
No Content | There is no content to send for this request, but the headers may be useful |
| CODE | STATUS | MEANING |
|---|---|---|
400 |
Bad Request | The server can't process the request due to a client error |
404 |
Not Found | The server can't find the requested resource (resource itself doesn't exist) |
API POST
β
Successful user authorization (code 200)
β
Unsuccessful user authorization as login and password are invalid (code 400)
β
Unsuccessful user authorization as password is missed (code 400)
β
Successful user registration (code 200)
β
Unsuccessful user registration as password is missed (code 400)
β
Creation a new user (code 201)
API DELETE
β
Deleting a user (code 204)
API PATCH
β
Updating user data (code 200)
API PUT
β
User data update (code 200)
API GET
β
Get users list page β2 and check its scheme (code 200)
β
Get users list page β2 and check users by IDs and names (code 200)
β
Attempt to get data about a non-existent single user (code 404)
β
Get single user data and check it by ID and name (code 200)
β
Get colors data and check it by IDs and names (code 200)
Lauching tests can be done using the following command from the terminal:
gradle clean testRunning the following command in the IDE terminal will run the tests locally.
Using the link below you can go to the build of the project:
- Open the project from the link above. The screenshot shows the appearance of the project window in Jenkins.
- Select the item "Collect now" on the left panel
Allure report and Allure TestOps
Using the link below you can go to the Allure report:
The screenshot below shows the main page of the report.
On the Suites tab a standard structural representation of executed tests can be found.
The test result on the right panel contains: request with attachment of request method, url, body, headers, curl and response with attachment of status code, headers, body.
Graphs allow you to see different statistics collected from the test data: statuses breakdown or severity and duration diagrams.
Using the link below you can go to the Allure TestOps:
Standard dashboard (see the picture below) provides instant insight on status of tests you're having in your project and resides in the Dashboards section of a project.
The default dashboard contains:- Number of test cases and distribution per state (active, in review, outdated etc.)
- Number of test cases and distribution between the manual tests and automated tests
- Automation trend with the insight regarding the number of test during last 14 days
- Information about launches and thier results status (failed, passed)
- Mutes trend, i.e. the number of tests excluded from statistics due to permanent failed state or flaky state.
Allure TestOps supports working with both β manual and automated test cases. Steps of a test case are described in the scenario.
The test result on the right panel contains: request with attachment of request method, url, body, headers, curl and response with attachment of status code, headers, body.
Automated test cases are generated based on test results received from automated tests.
Using the link below you can go to the Jira:
π
Link to the Jira
The task displays the test cases attached to it, as well as the results of running/passed tests.
After the project build is completed, the bot created in Telegram automatically processes and sends a message with the results.

