Use snapshot-tests to ease adapting assertions after changes to starter by marcphilipp · Pull Request #4310 · junit-team/junit-framework (original) (raw)
Prior to this commit, changing the tests in the jupiter-starter sample
project required to manually adapt the expected XML string in
XmlAssertions which was tedious and time-consuming. Instead, the XML
report is now checked against a snapshot that is committed to version
control. When a diff is encountered, the affected test will fail. The
actual and expected snapshots can then be diffed and, if ok, the actual
snapshot can be used to overwrite the expected one.
To avoid committing host names and usernames to source control, they are obfuscated prior to writing the snapshot files.