Skip to content

Conversation

@marcphilipp
Copy link
Member

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.

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.
@marcphilipp marcphilipp self-assigned this Feb 11, 2025
@marcphilipp marcphilipp merged commit c648369 into main Feb 11, 2025
15 checks passed
@marcphilipp marcphilipp deleted the marc/xml-snapshot-testing branch February 11, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants