v2.4.0

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.

UNIT 70% coverage target

Fast, isolated tests for individual functions and components. Run on every commit.

INTEGRATION Service boundaries

Tests for API endpoints, database operations, and external service integrations.

E2E Critical paths

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 Data

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.

Load Testing

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.

Testing Resources

ESC