This project contains both API and Performance tests for the Pet Store API. The framework is built using RestAssured and JMeter with TestNG integration.
main
: Contains API Testing Frameworkperformance-tests
: Contains Performance Testing Framework
src/
├── main/java/com/nexustest/
│ ├── api/
│ │ ├── base/
│ │ ├── models/
│ │ └── services/
│ └── core/
│ ├── config/
│ └── constants/
└── test/
├── java/com/nexustest/api/tests/
│ ├── PetTest.java
│ ├── StoreTest.java
│ └── UserTest.java
└── resources/
├── test-data/
└── testng.xml
- TC01: Create and verify new pet
- TC02: Update existing pet
- TC03: Find pets by status
- TC04: Delete pet
- TC05: Verify non-existent pet
- TC06: Invalid pet creation
- TC01: Create new order
- TC02: Get store inventory
- TC03: Get invalid order
- TC04: Delete order
- TC01: Create new user
- TC02: Create multiple users
- TC03: Update user
- TC04: User login/logout
- TC05: Delete user
To access the performance testing framework:
git checkout performance-tests
src/
├── main/java/com/nexustest/performance/
│ ├── config/
│ │ └── JMeterEngine.java # JMeter configuration
│ ├── reports/
│ │ └── JMeterReportGenerator.java # Report generation
│ └── utils/
│ └── ExtentReportManager.java # Test execution reporting
└── test/
├── java/com/nexustest/performance/scenarios/
│ ├── BasePerformanceTest.java
│ ├── TC01_PetStoreLoadTest.java
│ ├── TC02_PetStoreConcurrencyTest.java
│ ├── TC03_StoreStressTest.java
│ ├── TC04_PetStoreSpikeTest.java
│ └── TC05_UserStressTest.java
└── resources/
├── jmeter.properties
└── performance-testng.xml
- Normal conditions testing
- 25 concurrent users
- 5 second ramp-up
- Tests GET /pet/findByStatus
- Simultaneous operations testing
- 50 concurrent users
- 2 second ramp-up
- Tests POST /pet
- Store inventory under load
- 30 concurrent users
- 5 second ramp-up
- 2 iterations per user
- Sudden traffic spike testing
- 200 concurrent users
- 1 second ramp-up
- Single iteration
- User operations under load
- 100 concurrent users
- 10 second ramp-up
- 5 iterations per user
- Java 21
- Maven
- IntelliJ IDEA (recommended)
- Clone the repository:
git clone https://github.com/yourusername/nexus-test-hub.git
- For API Testing:
git checkout main
mvn clean install
- For Performance Testing:
git checkout performance-tests
mvn clean install
# Run all API tests
mvn clean test
# Run specific test suite
mvn clean test -Dsurefire.suiteXmlFiles=src/test/resources/testng.xml
# Run all performance tests
mvn clean test -DsuiteXmlFile=src/test/resources/performance-testng.xml
# Run specific performance test
mvn test -Dtest=TC01_PetStoreLoadTest
- ExtentReports:
test-output/extent-reports/
- TestNG reports:
target/surefire-reports/
- JMeter results:
target/jmeter/results/
- Performance reports:
target/jmeter/reports/
- Execution reports:
target/performance-reports/
- RestAssured
- TestNG
- Jackson
- Lombok
- ExtentReports
- Log4j2
- JMeter
- TestNG
- ExtentReports
- Log4j2
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Create a Pull Request
- Switch branches based on testing needs (API vs Performance)
- Ensure sufficient system resources for performance tests
- Review logs and reports after test execution
- Configure thread counts based on system capacity
- Fatih Mehmet ÇİÇEK - @linkedin
- Project Link: https://github.com/fatihmcicek/nexus-test-hub