Skip to content

Releases: skuzzle/snapshot-tests

v1.11.0

16 Jan 14:39
Compare
Choose a tag to compare

Migration Info:

Note

The following modules have been deprecated: snapshot-tests-jackson, snapshot-tests-jaxb and
snapshot-tests-jaxb-jakarta. New drop-in replacements are provided via snapshot-tests-json,
snapshpt-tests-xml-legacy and snapshot-tests-xml. (See also:
#67)

Important: These new modules come with slightly different Automatic-Module-Name. If you are using JPMS you need to
adjust your module-info.java when upgrading.

The deprecated modules will be removed with the next major version!

Note

When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Changes

  • Update to JUnit 5.10.1 (coming from 5.9.2)
  • Update to opentest4j 1.3.0 (coming from 1.2.0)
  • Update to jackson 2.16.1 (coming from 2.14.2)
  • Update to assertj 3.25.1 (coming from 3.24.2)
  • Update to jakarta.xml.bind-api 4.0.1 (coming from 4.0.0)
  • Update to jaxb-runtime 2.3.9 (coming from 2.3.3)
  • (Jakarta) Update to jaxb-runtime 4.0.4 (coming from 4.0.1)

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.11.0

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.11.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.11.0"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.11.0")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.11.0")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-json</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-json:1.11.0")

If you want XML based snapshots using jaxb and legacy javax.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml-legacy</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml-legacy:1.11.0")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml:1.11.0")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-html:1.11.0")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.11.0")

Diff-Tool

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>diff-tool</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:diff-tool:1.11.0")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.11.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.11.0")

v1.10.1

30 Mar 07:59
Compare
Choose a tag to compare

Migration Info:

Note
The following modules have been deprecated: snapshot-tests-jackson, snapshot-tests-jaxb and
snapshot-tests-jaxb-jakarta. New drop-in replacements are provided via snapshot-tests-json,
snapshpt-tests-xml-legacy and snapshot-tests-xml. (See also:
#67)

Important: These new modules come with slightly different Automatic-Module-Name. If you are using JPMS you need to
adjust your module-info.java when upgrading.

The deprecated modules will be removed with the next major version!

Note
When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Changes

  • #93: Fix bug in determining the line ending from git

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.10.1

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.10.1</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.10.1"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.10.1")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.10.1")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-json</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-json:1.10.1")

If you want XML based snapshots using jaxb and legacy javax.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml-legacy</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml-legacy:1.10.1")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml:1.10.1")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-html:1.10.1")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.10.1")

Diff-Tool

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>diff-tool</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:diff-tool:1.10.1")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.10.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.10.1")

v1.10.0

28 Mar 11:22
Compare
Choose a tag to compare

Migration Info:

Note
The following modules have been deprecated: snapshot-tests-jackson, snapshot-tests-jaxb and
snapshot-tests-jaxb-jakarta. New drop-in replacements are provided via snapshot-tests-json,
snapshpt-tests-xml-legacy and snapshot-tests-xml. (See also:
#67)

Important: These new modules come with slightly different Automatic-Module-Name. If you are using JPMS you need to
adjust your module-info.java when upgrading.

The deprecated modules will be removed with the next major version!

Note
When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Changes

  • #67: Fix inconsistent naming of structured data modules

  • #60: Internal API for plugging in test-framework specific behavior

  • #80: Use spotless and reformat whole code base

  • #87: Allow to configure diff format

  • #88: Extract diff creation into own module

  • #44/#90: Add possibility to normalize line endings (according to local git config)

  • Update to jsonassert 1.5.1 (coming from 1.5.0)

  • List notable changes since last release in reference documentation

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.10.0

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.10.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.10.0"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.10.0")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.10.0")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-json</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-json:1.10.0")

If you want XML based snapshots using jaxb and legacy javax.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml-legacy</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml-legacy:1.10.0")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-xml</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-xml:1.10.0")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-html:1.10.0")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.10.0")

Diff-Tool

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>diff-tool</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:diff-tool:1.10.0")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.10.0</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.10.0")

v1.9.2

27 Feb 18:07
Compare
Choose a tag to compare

Migration Info:

Note
When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Check the resp. section in the README!

Fixes

  • #76: Improved lazy XPath rule configuration
  • #77: Small XPath performance optimization
  • #78: Throw AssertionError only once
  • #79: Filter out internal stack frames from all AssertionErrors

Build

  • #75: Use Project.copy instead of Copy task

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.9.2

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.9.2</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.9.2"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.9.2")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.9.2")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.9.2")

If you want XML based snapshots using jaxb and javax.xml legacy namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.9.2")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb-jakarta</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.9.2")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-html:1.9.2")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.9.2")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.9.2</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.9.2")

v1.9.1

24 Feb 11:20
Compare
Choose a tag to compare

Migration Info:

Note
When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Check the resp. section in the README!

All Changes:

  • #49: Delete context files as well when deleting orphaned snapshots
  • #57: Support XML namespaces in XPaths when using custom comparison rules
  • #61: @SnapshotDirectory is not allowed anymore on test methods, only on test class
  • #64: Migrate build to gradle
  • #66: XmlSnapshot.withEnableXPathDebugging: Boolean parameter 'enabled' not taken into account
  • #71: Gracefully support JUnit5 nested tests
  • #73: MarshallerSupplier functional interface is not public
  • #74: Add recursive directory scanning via DirectoriesFrom.recursive()
  • Deprecate PathFilter in favor of TestFileFilter and TestDirectoryFilter
  • Improve format and information density of XPath debugging (can be enabled with XmlSnapshot.withEnableXPathDebugging(true))
  • Improve removal of internal stack frames from stacktraces of assertion errors
  • SnapshotException is now an unchecked exception
  • DSL no longer throws checked exceptions
  • Update to jackson 2.14.2 (coming from 2.10.5)

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.9.1

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.9.1</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.9.1"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.9.1")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.9.1")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.9.1")

If you want XML based snapshots using jaxb and javax.xml legacy namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.9.1")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb-jakarta</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.9.1")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-html:1.9.1")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.9.1")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.9.1</version>
    <scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.9.1")

1.8.0

18 Jan 12:04
Compare
Choose a tag to compare

Migration Info:

Note
When upgrading from a version prior to 1.8.0, instead of depending on snapshot-tests-core you should now
either depend on snapshot-tests-junit5 or snapshot-tests-junit4.
This will become mandatory with the next major version!

Check the resp. section in the README!

All Changes:

  • #20: Make Snapshot a top-level type in de.skuzzle.test.snapshot and deprecate de.skuzzle.test.snapshot.SnapshotDsl.Snapshot
  • #52: Test methods that contain at least on disabled assertion and no failed assertions will properly be marked as 'skipped' by the test framework
  • #54: Add support for JUnit4
  • #58: Include paths to initially created snapshot files in assertion-failed message
  • Officially support Java 17
  • Move JUnit5 support into separate module
  • Build against JUnit 5.9.2 (coming from 5.9.1)
  • Add ContextFiles class which groups the paths to all generated files
  • Deprecate SnapshotTestResult.targetFile(), SnapshotTestResult.actualResultFile() and SnapshotTestResult.rawActualResultFile() in favor of SnapshotTestResult.contextFiles()
  • Add disabledBecause(String) terminal DSL operation. The string can be used to leave an informative message to readers so they know why the assertion is disabled
  • Improve formatting of orphaned snapshot warning
  • Streamline internal implementation
  • Provide new reference documentation at https://skuzzle.github.io/snapshot-tests/reference/1.8.0

Reference Documentation

Reference

Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.8.0

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.8.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.8.0"))

Artifacts

Choose a test framework

ℹ️ All options include support for plain text snapshots.

If you are using JUnit5:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit5</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-junit5:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-junit5:1.8.0")

If you are using JUnit4:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-junit4</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-junit4:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-junit4:1.8.0")

Choose a snapshot format (optional)

Show supported snapshot format artifacts

If you want JSON based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.8.0")

If you want XML based snapshots using jaxb and javax.xml legacy namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.8.0")

If you want XML based snapshots using jaxb new jakarta.xml namespaces:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb-jakarta</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.8.0")

If you want HTML based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.8.0")

Additional utilities

Show utility artifacts

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.8.0")

Object normalization (⚠️ Experimental⚠)

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.8.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.8.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.8.0")

1.7.1

22 Dec 14:38
Compare
Choose a tag to compare
  • #51: Line numbers in diff are off by number of header lines.
  • HTML comparison used generic XmlUnitStructuralAssertions instead of specialized HtmlStructuralAssertions

Maven Central coordinates for this release:

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.7.1</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.7.1"))

Artifacts

If you only need text based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-core</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.7.1")

If you need json based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.7.1")

If you need xml based snapshots using javax.xml legacy namespaces (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.7.1")

If you need xml based snapshots using new jakarta.xml namespaces (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb-jakarta</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.7.1")

If you need HTML based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.7.1")

Experimental

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.7.1")

Object normalization

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.7.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.7.1'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.7.1")

1.7.0

19 Dec 09:54
Compare
Choose a tag to compare
  • #19: Deprecate the whole @EnabledSnapshotTests annotation in favor of annotation with same name within junit5 package
  • #30: Deprecate EnableSnapshotTests.softAssertions. Soft assertions will no longer be supported in the next major version
  • #32: Support for jakarta namespaces via new snapshot-tests-jaxb-jakarta module
  • #47: Add new SnapshotTestOptions annotation which allows to configure some detailed aspects of the snapshot engine
  • Deprecate EnableSnapshotTests.snapshotDirectory in favor of new annotation @SnapshotDirectory
  • Deprecate SnapshotTestResult.serializedSnapshot() in favor of SnapshotTestResult.snapshotFile()
  • Add SnapshotTestResult.serializedActual()
  • Add SnapshotTestResult.actualResultFile()
  • Add SnapshotTestResult.rawActualResultFile()
  • Add the possibility to configure the number of context lines printed around a change in the default unified diff via @SnapshotTestOptions.textDiffContextLines()
  • Add the possibility to always persist the latest actual result as a sibling file of the real .snapshot file via @SnapshotTestOptions.alwaysPersistActualResult()
  • Add the possibility to additionally persist the raw actual result in a sibling file of the real .snapshot file via @SnapshotTestOptions.alwaysPersistRawResult(). The raw result does not contain the snapshot header information.
  • Improve compatibility with JUnit5's @Nested tests (general support for @Nested is still experimental though)
  • Unified diffs within assertion failure messages now come with full line information

Note: This release comes with a few major deprecations that are preparing our transition to the next major version
that is 2.0. That version will likely see all those deprecated methods to be removed. In general, simple drop in
replacements are provided and documented to ensure an easy migration.

Maven Central coordinates for this release:

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.7.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.7.0"))

Artifacts

If you only need text based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-core</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.7.0")

If you need json based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.7.0")

If you need xml based snapshots using javax.xml legacy namespaces (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.7.0")

If you need xml based snapshots using new jakarta.xml namespaces (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb-jakarta</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb-jakarta:1.7.0")

If you need HTML based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.7.0")

Experimental

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.7.0")

Object normalization

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.7.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.7.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.7.0")

1.6.1

23 Nov 11:57
Compare
Choose a tag to compare
  • Deprecated property DirectoriesFrom.directory should not be mandatory

Maven Central coordinates for this release:

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.6.1</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.6.1"))

Artifacts

If you only need text based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-core</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.6.1")

If you need json based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.6.1")

If you need xml based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.6.1")

If you need HTML based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.6.1")

Experimental

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.6.1")

Object normalization

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.6.1</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.6.1")

1.6.0

21 Nov 09:19
Compare
Choose a tag to compare
  • #42: Publish flattened version of our artifact to fix BOM distribution
  • #43: Allow XML structure comparison for String input
  • Add XmlSnapshot.withEnableXPathDebugging(...) and HtmlSnapshot.withEnableXPathDebugging(...) to print results of applying custom comparison rules
  • Fixed bugs and performance issues in XPath comparison engine
  • toString() of TestFile and TestDirectory contain full absoulte path to the file instead of just the file name
  • Deprecate FilesFrom.directory in favor of FilesFrom.testResourcesDirectory and FilesFrom.projectDirectory
  • Deprecate DirectoriesFrom.directory in favor of DirectoriesFrom.testResourcesDirectory and DirectoriesFrom.projectDirectory

Maven Central coordinates for this release:

BOM Artifact

Manages the versions of all modules in case you are using multiple in your project

Maven Central

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-bom</artifactId>
    <version>1.6.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.6.0"))

Artifacts

If you only need text based snapshots:

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-core</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.6.0")

If you need json based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jackson</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.6.0")

If you need xml based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-jaxb</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.6.0")

If you need HTML based snapshots (includes -core):

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-html</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.6.0")

Experimental

Directory Params

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-directory-params</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.6.0")

Object normalization

Maven Central JavaDoc

<dependency>
    <groupId>de.skuzzle.test</groupId>
    <artifactId>snapshot-tests-normalize</artifactId>
    <version>1.6.0</version>
    <scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.6.0")