Skip to content

Add framework support to regenerate all snapshot files #277

@nickbattam-tessella

Description

@nickbattam-tessella

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:

  • new '-updateSnapshot' argument support in runtest(...) method
  • instances of TestCaseWithSave that are executed will regenerate the snapshot files

Metadata

Metadata

Assignees

No one assigned

    Labels

    TestingRelated to testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions