This project is an API Test Automation framework built with Java, Maven, and Rest Assured, designed to validate the functionality of the Petstore API. The test suite includes CRUD operations for users, pets, and orders, ensuring API reliability and correctness.
- Java (Test logic & assertions)
- Rest Assured (API testing)
- TestNG (Test execution framework)
- Maven (Dependency management)
- Log4j2 (Logging)
- Extent Reports (Test reporting)
✅ Automates key Petstore API endpoints
✅ Generates detailed test reports with Extent Reports
✅ Supports parameterized testing with TestNG
✅ Integrated logging with Log4j2
✅ Docker-ready for containerized execution
petstore-api-automation-java/
│── src/
│ ├── main/
│ │
│ │ └── resources/ # Config files
│ ├── test/
| ├── java/com/petstore/endpoints/ # API request methods
│ │ ├── java/com/petstore/models/ # Data models
│ │ ├── java/com/petstore/utils/ # Utilities (Log4j, Config)
│ │ ├── java/com/petstore/tests/ # Test cases
│ │ ├── java/com/petstore/listeners/ # Test listeners (Extent Reports)
│ │ ├── resources/testdata.json # Test data
│── pom.xml # Maven dependencies
│── log4j2.xml # Logging configuration
│── testng.xml # TestNG suite
│── Dockerfile # Docker setup for running tests
│── README.md # Project documentation
git clone [email protected]:anandhuk/petstore-api-automation-java.git
cd petstore-api-automation-java
mvn clean install
mvn test
- Extent Report:
./reports/Test-Report-<timestamp>.html
- Logs:
./logs/execution.log
docker build -t petstore-api-tests .
docker run petstore-api-tests
Feel free to contribute! Open a PR for enhancements or bug fixes.
This project is licensed under MIT License.