Skip to content

v1.9.1

Compare
Choose a tag to compare
@skuzzle skuzzle released this 24 Feb 11:20
· 55 commits to main since this release

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")