The ISIS extension to the MATLAB testing framework adds a "TestCaseWithSave" class that performs a snapshot test against results cached in a .mat file.
These files can be (re)generated by instantiating the class with a '-save' argument. This must be done on a test-by-test basis, there is no way to perform this via the runtests(...)
Note: running all tests with the '--updateSnapshot' flag should be considered carefully, any tests failures resulting from bugs could potentially update the snapshots to contain incorrect data.
Whether "all" snapshots or only snapshots for failing tests are updated is considered an implementation detail as it has no material impact on the resulting test behaviour.
Output:
The ISIS extension to the MATLAB testing framework adds a "TestCaseWithSave" class that performs a snapshot test against results cached in a
.matfile.These files can be (re)generated by instantiating the class with a
'-save'argument. This must be done on a test-by-test basis, there is no way to perform this via theruntests(...)Note: running all tests with the '--updateSnapshot' flag should be considered carefully, any tests failures resulting from bugs could potentially update the snapshots to contain incorrect data.
Whether "all" snapshots or only snapshots for failing tests are updated is considered an implementation detail as it has no material impact on the resulting test behaviour.
Output:
'-updateSnapshot'argument support inruntest(...)methodTestCaseWithSavethat are executed will regenerate the snapshot files