1.4 KiB
1.4 KiB
Summarizer Task Tests
This directory contains end-to-end tests for the summarizer task using the Prometheus test framework.
Structure
tests/
├── config.yaml # Test configuration
├── workers.json # Worker configuration
├── data/ # Test data
│ ├── todos.json # Sample todo items
│ └── issues.json # Sample issues
├── stages/ # Test stages implementation
├── e2e.py # Test runner script
└── steps.py # Test steps definition
Prerequisites
- Install the test framework:
pip install -e test-framework/
- Set up environment variables in
.env
:
ANTHROPIC_API_KEY=your_test_key
GITHUB_USERNAME=your_test_username
GITHUB_TOKEN=your_test_token
Running Tests
To run the tests:
python -m tests.e2e
To force reset databases before running:
python -m tests.e2e --reset
Test Flow
-
API Key Validation
- Validates Anthropic API key
-
GitHub Validation
- Validates GitHub credentials
-
Todo Management
- Fetches todos for each worker
- Generates summaries
- Submits results
-
Audit Process
- Workers audit each other's submissions
Adding New Tests
- Create a new stage in
stages/
- Add stage to
stages/__init__.py
- Add test step in
steps.py
- Update test data in
data/
if needed