-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Integration Tests and E2E Testing
📝 Description
Create a complete suite of integration tests and end-to-end tests that validate the functioning of the aggregator as a whole. These tests should simulate real data from the ingestor, verify the complete pipeline, and validate the results stored in Redis.
Context: Unit tests validate individual components, but we need tests that validate that the complete system works correctly by integrating all the pieces.
Tech Stack:
- Jest for test runner
- @nestjs/testing for NestJS testing
- Testcontainers or Docker Compose for test Redis
- Mocks for the ingestor
- TypeScript with strict types
✅ Requirements
- Create integration test suite for the complete pipeline
- Implement ingestor mocks that emit test data
- Use Testcontainers or Docker Compose to start test Redis
- Create tests that validate the complete aggregation flow
- Validate that data is correctly stored in Redis
- Create tests for error scenarios (ingestor down, Redis down)
- Implement basic load tests (throughput)
- Create fixtures with realistic test data
- Configure CI to automatically run integration tests
🎯 Acceptance Criteria
- An integration test suite exists that can be run with
npm run test:integration - Tests automatically start Redis using Testcontainers or Docker
- The ingestor is mocked to provide controlled test data
- Tests validate the complete pipeline from reception to storage
- It's verified that aggregated prices are mathematically correct
- Tests exist for error handling (services down, invalid data)
- Tests run automatically in CI
- Total code coverage (unit + integration) is >80%
- How to run the tests is documented in the README
📁 Expected files to change/structure
apps/aggregator/test/- Integration test directoryintegration/aggregator-pipeline.integration.spec.tserror-handling.integration.spec.ts
e2e/aggregator.e2e.spec.ts
fixtures/price-data.fixtures.ts
mocks/ingestor.mock.ts
setup/test-setup.ts
apps/aggregator/jest.integration.config.js- Config for integration testsapps/aggregator/docker-compose.test.yml- Redis for testingapps/aggregator/package.json- Add test scripts and dependencies.github/workflows/ci.yml- Add integration tests to CIapps/aggregator/README.md- Document testing strategy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program