Description
I believe we can significantly simplify the process of running regression tests in this repository.
Currently, there are multiple scripts dedicated to this task, with separate versions depending on whether the system is Windows or Unix-based. Maintaining duplicate scripts increases complexity.
Personally, I've also found it very difficult to run the scripts and only succeeded after much manual effort.
By bundling the regression testing workflow into a Docker container, we could:
- Reduce maintenance overhead by consolidating all scripts into a single environment.
- Streamline the testing process, making it easier to run the same tests locally and in CI/CD pipelines.
- Allow users to test private models, making it easier to detect regressions in their own networks.
- Enable commit-specific testing, allowing users to identify exactly when a regression was introduced.
The same Docker container could build, test, and run regression tests in one place, simplifying the CI/CD workflow for both contributors and maintainers.
I've created a proof of concept (PoC) that demonstrates this approach:
https://github.com/lbutler/epanet-regression-testing
Action | Command |
---|---|
Run standard regression tests (latest master vs. reference v2.2 ) |
docker run --rm epanet-regtest |
Test a specific branch (e.g., feature-branch ) |
docker run --rm -e SUT_TAG="feature-branch" epanet-regtest |
Test a specific commit (e.g., d4e5f8c ) |
docker run --rm -e SUT_TAG="d4e5f8c" epanet-regtest |
Run both standard and custom tests | docker run --rm -e DO_CUSTOM_TEST=true -v /path/to/private/tests:/custom_tests epanet-regtest |
Before investing more time into refining and testing it, I’d like to hear the general consensus on this approach.
(previous discussions related to regression testing: #635 & #736 )