Automated testing project for the ReqRes API using Java, RestAssured, and JUnit 5.
The goal of this project is to demonstrate CRUD (Create, Read, Update, Delete) operations on a RESTful API.
This project validates the functionality of public API endpoints from reqres.in
using automated tests written in Java. It focuses on verifying the correctness of HTTP methods,
status codes, and response payloads.
| Operation | HTTP Method | Endpoint | Test Class | Status |
|---|---|---|---|---|
| Create User | POST |
/api/users |
CreateUserTest.java |
✅ |
| Read Users | GET |
/api/users?page=2 |
GetUsersTest.java |
✅ |
| Update User | PUT |
/api/users/2 |
UpdateUserTest.java |
✅ |
| Delete User | DELETE |
/api/users/2 |
DeleteUserTest.java |
✅ |
Each test includes:
- Proper status code validation
- Response body assertions (using Hamcrest)
- Basic JSON payloads for POST and PUT requests
| Tool / Library | Purpose |
|---|---|
| Java 17 | Programming language |
| Maven | Build automation & dependency management |
| JUnit 5 | Test framework |
| RestAssured | API testing library |
| Hamcrest | Assertions and matchers |
├── src/
│ └── test/
│ └── java/
│ └── tests/
│ ├── CreateUserTest.java
│ ├── GetUsersTest.java
│ ├── UpdateUserTest.java
│ └── DeleteUserTest.java
│
├── pom.xml
├── .gitignore
└── README.md
- Clone the repository:
git clone https://github.com/VladAndrei25/restapi-automation-tests.git cd restapi-automation-tests - Run tests via Maven:
mvn test
3.Run a specific test example:
mvn -Dtest=CreateUserTest test- CreateUserTest
- DeleteUserTest
- GetUserTest
- UpdateUserTest
Example of successful test execution in CreateUserTest:
Example of succesful test execution in GetUserTest: Example of succesful test execution in UpdateUserTest: Example of succesful test execution in DeleteUserTest:Add request/response logging for better visibility (.log().all())
Integrate with Allure for test reporting
Parameterize test data
Add negative test scenarios (invalid inputs)
Add CI/CD integration with GitHub Actions
This project is licensed under the MIT License
Radulescu Vlad Andrei
📧 GitHub Profile: [https://github.com/VladAndrei25]
💬 Feel free to reach out for collaboration or feedback!




