Testing Plan and Continuous Integration - team-exception-handlers/TransitSync GitHub Wiki
Testing Strategy
Tests cover the complete core logic of the project. Python code is tested with pytest, with Hypothesis for property tests. TypeScript code is tested with Jest. Mocking isolates components from Supabase and the network.
| Test type | What it checks | Example |
|---|---|---|
| Unit | One function or class against hand-calculated expected values | test_events_scheduled_out_of_order_are_processed_in_time_order |
| Property (Hypothesis) | Rules that must hold for any input | test_processing_order_never_goes_backwards |
| Determinism | Same scenario and seed give byte-identical output | test_same_scenario_and_seed_give_byte_identical_output |
| Integration | Components working together | test_smoke_run_with_no_control_strategy_writes_the_expected_log |
| Data processing | GTFS extraction and walking-time fit | Planned |
| Front end | UI behaviour (Jest, Playwright) | Planned |
PR Review Stategy
All pull requests to the main branch will by policy be required to be reviewed and approved by one of team members (one who was not also an author on said PR).
Continuous integration
We will set up a CI/CD pipeline using GitHub Actions. It will automatically run our tests and lint our code on each push and opened PR. Any failing test or failing the lint check will prevent merging.
Pipeline steps
ruff check .(lint, complexity and statement limits)ruff format --check .pytest, including the determinism test- Workflow file: planned in #11