A robust REST API testing framework for reservation systems. Automates booking flows, authentication, and CRUD operations across multiple environments. Features reporting, test data management, and performance validation for hotel and travel reservation APIs.
graph TD
A[Test Suites] --> B[Base Test Class]
B --> C[API Clients]
C --> D[RestAssured]
D --> E[HTTP Client]
B --> F[Test Data]
B --> G[Validation]
G --> H[Response Validation]
G --> I[Security Validation]
G --> J[Input Validation]
B --> K[Reporting]
K --> L[ExtentReports]
K --> M[TestNG Reports]
B --> N[Performance Testing]
N --> O[Gatling]
- Language: Java 11
- Testing Framework: TestNG
- API Testing: RestAssured
- Performance Testing: Gatling
- Reporting: ExtentReports, TestNG Reports
- Build Tool: Maven
- Logging: Log4j2
- JSON Processing: Jackson
- Assertions: TestNG Assertions
eReservations/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/ereservations/
│ │ │ ├── api/ # API Client Layer
│ │ │ │ ├── BaseApiClient.java
│ │ │ │ ├── BookingApiClient.java
│ │ │ │ ├── HealthCheckApiClient.java
│ │ │ │ ├── PingApiClient.java
│ │ │ │ └── SystemApiClient.java
│ │ │ └── models/ # Data Models
│ │ └── resources/ # Main Resources
│ └── test/
│ ├── java/
│ │ └── com/ereservations/
│ │ └── tests/ # Test Classes
│ ├── resources/
│ │ ├── config.properties # Configuration
│ │ ├── chaintest.properties # ChainTest Config
│ │ └── test-suites/ # TestNG Suites
│ └── gatling/
│ ├── simulations/ # Gatling Tests
│ └── resources/ # Gatling Resources
├── target/
│ ├── surefire-reports/ # TestNG Reports
│ └── gatling/results/ # Gatling Reports
├── scripts/ # Utility Scripts
├── testng.xml # TestNG Configuration
├── pom.xml # Maven Configuration
└── README.md # Project Documentation
sequenceDiagram
participant T as Test
participant B as BaseTest
participant A as API Client
participant S as System
T->>B: Initialize Test
B->>A: Setup API Client
A->>S: Send Request
S->>A: Receive Response
A->>B: Validate Response
B->>T: Test Result
-
Modular Architecture
- Separate API client layer
- Reusable test utilities
- Configurable test suites
-
Comprehensive Testing
- Functional testing
- Security testing
- Performance testing
- Data validation
-
Reporting
- Detailed test reports
- Performance metrics
- Test execution logs
-
Configuration Management
- Environment-specific configs
- Test data management
- Resource handling
-
Basic Functionality
- Create booking
- Get booking
- Update booking
- Delete booking
-
Security Testing
- Input validation
- XSS prevention
- SQL injection prevention
- Authentication checks
-
Performance Testing
- Load testing
- Stress testing
- Endurance testing
-
TestNG Reports
- Test execution summary
- Failed test details
- Test timing information
-
ExtentReports
- Detailed test steps
- Screenshots
- Test categorization
-
Gatling Reports
- Response time metrics
- Request statistics
- Error rates
- Clone the repository
- Install dependencies:
mvn clean install
- Run tests:
mvn test
- Generate reports:
mvn surefire-report:report
graph LR
A[Response Time] --> B[< 200ms]
C[Throughput] --> D[> 1000 req/s]
E[Error Rate] --> F[< 0.1%]
G[CPU Usage] --> H[< 70%]
I[Memory Usage] --> J[< 80%]
-
Input Validation
- Required field checks
- Data type validation
- Length restrictions
-
Security Headers
- X-Content-Type-Options
- X-Frame-Options
- X-XSS-Protection
-
Authentication
- Token validation
- Session management
- Role-based access
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.