A comprehensive, enterprise-grade API test automation framework built with Cypress, designed for testing complex microservices architectures across multiple environments.
This framework provides robust API testing capabilities for:
- Client Portal Aggregators (CP_Agg) - Customer-facing API endpoints
- Back Office Aggregators (BO_Agg) - Internal business operations APIs
- Back Office BFF (BO_Bff) - Backend for Frontend services
- Back Office SCOS (BO_Scos) - Service-oriented architecture APIs
- Partner APIs - Third-party integration endpoints
- Integration APIs - Cross-service communication testing
- Staging Environment - Pre-production testing
- UAT Environment - User acceptance testing
- Configurable Environments - Easy environment switching
- Mochawesome Reports - Beautiful HTML test reports
- Multi-Reporter Support - JUnit, JSON, and custom reporters
- Coverage Analysis - API endpoint coverage tracking
- CI/CD Integration - Automated report generation
- Common Utilities - Date operations, HTTP status codes, document management
- Crypto Utilities - Blockchain transaction testing (Ethereum, Solana)
- Data Generation - Faker.js integration for test data
- Token Management - MSAL authentication bypass
- File Processing - Excel workbook manipulation
- MSAL Token Injection - Azure AD SSO bypass
- Multi-Auth Support - Various authentication methods
- Encrypted Keys - AES encryption for sensitive data
- Environment Variables - Secure configuration management
- Node.js 18+
- npm or yarn
- Docker (optional)
# Clone the repository
git clone https://github.com/Purush1701/API-automation-repo.git
cd API-automation-repo
# Install dependencies
npm install
# Configure environment
cp .env.staging.sample .env.staging
cp .env.uat.sample .env.uat# Open Cypress Test Runner
npm run cy:open:staging
npm run cy:open:uat# Run all tests in staging
npm run cy:run:staging
# Run specific API groups
npm run cy:run:staging:CP # Client Portal APIs
npm run cy:run:staging:BO # Back Office APIs
npm run cy:run:staging:PartnerAPI # Partner APIscypress/
├── e2e/ # Test specifications
│ ├── BO_Agg/ # Back Office Aggregator tests
│ ├── CP_Agg/ # Client Portal Aggregator tests
│ ├── PartnerAPI/ # Partner API tests
│ └── IntegrationAPI/ # Integration API tests
├── fixtures/ # Test data and configurations
├── support/ # Custom commands and utilities
│ └── Utility/ # Reusable utility functions
└── reports/ # Generated test reports
- Staging:
cypress.config.staging.js - UAT:
cypress.config.uat.js - Common:
cypress.common.js
- Fixtures: JSON-based test data
- Dynamic Data: Faker.js generated data
- Environment-Specific: Separate configs per environment
- HTML Reports - Comprehensive test results
- Coverage Reports - API endpoint coverage analysis
- Performance Metrics - Response time tracking
- GitHub Actions - Automated test execution
- Docker Support - Containerized test runs
- AWS Integration - S3 report storage
- Data Sanitization - No sensitive data in repository
- Encrypted Credentials - Secure key management
- Environment Isolation - Separate test environments
- Audit Logging - Comprehensive test audit trails
- Ethereum Integration - Alchemy SDK support
- Solana Testing - SPL token operations
- Multi-Signature Workflows - Complex transaction testing
- Excel Manipulation - XLSX file processing
- Document Upload - Multi-format file testing
- Base64 Encoding - File encoding utilities
- Parallel Execution - Multi-threaded test runs
- Resource Optimization - Efficient memory usage
- Docker Support - Scalable containerized testing
- Cloud Integration - AWS ECR image support
- Fork the repository
- Create a feature branch
- Add your tests following the established patterns
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions and support:
- Create an issue in this repository
- Check the documentation in the
docs/folder - Review the utility functions in
cypress/support/Utility/
Built with ❤️ using Cypress, Node.js, and modern testing practices