Testing Strategy
Comprehensive testing approach covering unit tests, integration tests, E2E tests, and performance testing for IRA FORCE services.
Testing Pyramid
IRA FORCE follows the testing pyramid approach with a strong foundation of unit tests, supported by integration and end-to-end tests for critical workflows.
Fast, isolated tests for individual functions and components. Run on every commit.
Tests for API endpoints, database operations, and external service integrations.
End-to-end tests for critical user journeys including clock-in/out, scheduling, and incident reporting.
Running Tests
Tests can be run locally or via the CI pipeline. See the repository README for specific commands and configuration options.
Test fixtures and seed data are maintained in the /tests/fixtures directory. Database seeds for local testing are documented in the internal wiki.
Code Coverage
Coverage reports are generated on each build and tracked in our CI pipeline. Minimum thresholds are enforced for merging to protected branches.
API Testing
API endpoints are tested using Postman collections and automated via Newman in the CI pipeline.
Performance Testing
Load testing is conducted before major releases using k6 scripts. Performance benchmarks and results are documented in the internal performance wiki.
Run load tests only against staging environment. Never run performance tests against production without DevOps approval.
Mobile Testing
Mobile apps are tested using device farms and automated UI testing. See the Mobile App Development guide for specific testing procedures.