-
Notifications
You must be signed in to change notification settings - Fork 35
Create an end-to-end test #138
Description
What
Create an end-to-end test that runs Simpaths (similarly to the existing run-simpaths GitHub Action that runs automatically), and compares some output file to an "expected output" file stored in the git repo.
Criteria:
- Should be possible to run with a single command, e.g. using Maven
- Should be possible to run both locally and in GitHub Actions
- Should provide an easy way to update the "expected output" file when needed (when changes in the output are intentional, e.g. after substantive changes to a process)
Why
This type of test is sometimes called a "golden master test", "approval test", "snapshot test", or "characterization test", and helps ensure that structural changes to the code haven't unintentionally changed the model's behaviour. This is a useful technique for allowing big structural changes to be made more safely in a codebase that otherwise doesn't have much test coverage.
Since it's already possible to run the model in GitHub Actions, this is a relatively small and simple modification, but would increase confidence in code changes massively. It will also enable the kind of structural changes that will be necessary to make unit testing possible.