Releases: skuzzle/snapshot-tests
v1.11.0
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 from5.9.2
) - Update to opentest4j
1.3.0
(coming from1.2.0
) - Update to jackson
2.16.1
(coming from2.14.2
) - Update to assertj
3.25.1
(coming from3.24.2
) - Update to jakarta.xml.bind-api
4.0.1
(coming from4.0.0
) - Update to jaxb-runtime
2.3.9
(coming from2.3.3
) - (Jakarta) Update to jaxb-runtime
4.0.4
(coming from4.0.1
)
Reference Documentation
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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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
<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 (
<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
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 viasnapshot-tests-json
,
snapshpt-tests-xml-legacy
andsnapshot-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 yourmodule-info.java
when upgrading.The deprecated modules will be removed with the next major version!
Note
When upgrading from a version prior to1.8.0
, instead of depending onsnapshot-tests-core
you should now
either depend onsnapshot-tests-junit5
orsnapshot-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 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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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
<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 (
<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
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 viasnapshot-tests-json
,
snapshpt-tests-xml-legacy
andsnapshot-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 yourmodule-info.java
when upgrading.The deprecated modules will be removed with the next major version!
Note
When upgrading from a version prior to1.8.0
, instead of depending onsnapshot-tests-core
you should now
either depend onsnapshot-tests-junit5
orsnapshot-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 from1.5.0
) -
List notable changes since last release in reference documentation
Reference Documentation
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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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
<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 (
<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
Migration Info:
Note
When upgrading from a version prior to1.8.0
, instead of depending onsnapshot-tests-core
you should now
either depend onsnapshot-tests-junit5
orsnapshot-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 ofCopy
task
Reference Documentation
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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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 (
<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
Migration Info:
Note
When upgrading from a version prior to1.8.0
, instead of depending onsnapshot-tests-core
you should now
either depend onsnapshot-tests-junit5
orsnapshot-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 ofTestFileFilter
andTestDirectoryFilter
- 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 from2.10.5
)
Reference Documentation
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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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 (
<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
Migration Info:
Note
When upgrading from a version prior to1.8.0
, instead of depending onsnapshot-tests-core
you should now
either depend onsnapshot-tests-junit5
orsnapshot-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 inde.skuzzle.test.snapshot
and deprecatede.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 from5.9.1
) - Add
ContextFiles
class which groups the paths to all generated files - Deprecate
SnapshotTestResult.targetFile()
,SnapshotTestResult.actualResultFile()
andSnapshotTestResult.rawActualResultFile()
in favor ofSnapshotTestResult.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 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
<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:
<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:
<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:
<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:
<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:
<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:
<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
<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 (
<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
- #51: Line numbers in diff are off by number of header lines.
- HTML comparison used generic
XmlUnitStructuralAssertions
instead of specializedHtmlStructuralAssertions
Maven Central coordinates for this release:
BOM Artifact
Manages the versions of all modules in case you are using multiple in your project
<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:
<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
):
<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
):
<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
):
<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
):
<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
<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
<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: Deprecate the whole
@EnabledSnapshotTests
annotation in favor of annotation with same name withinjunit5
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 ofSnapshotTestResult.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
<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:
<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
):
<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
):
<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
):
<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
):
<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
<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
<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
- 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
<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:
<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
):
<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
):
<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
):
<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
<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
<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
- #42: Publish flattened version of our artifact to fix BOM distribution
- #43: Allow XML structure comparison for String input
- Add
XmlSnapshot.withEnableXPathDebugging(...)
andHtmlSnapshot.withEnableXPathDebugging(...)
to print results of applying custom comparison rules - Fixed bugs and performance issues in XPath comparison engine
toString()
ofTestFile
andTestDirectory
contain full absoulte path to the file instead of just the file name- Deprecate
FilesFrom.directory
in favor ofFilesFrom.testResourcesDirectory
andFilesFrom.projectDirectory
- Deprecate
DirectoriesFrom.directory
in favor ofDirectoriesFrom.testResourcesDirectory
andDirectoriesFrom.projectDirectory
Maven Central coordinates for this release:
BOM Artifact
Manages the versions of all modules in case you are using multiple in your project
<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:
<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
):
<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
):
<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
):
<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
<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
<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")