Convenient snapshot testing for Java
MIT License
Bot releases are hidden (Show)
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!
Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.10.1
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"))
ℹ️ 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")
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")
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 (⚠️ Experimental⚠)
<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")
Published by skuzzle over 1 year ago
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!
#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 for this release: https://skuzzle.github.io/snapshot-tests/reference/1.10.0
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"))
ℹ️ 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")
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")
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 (⚠️ Experimental⚠)
<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")
Published by skuzzle over 1 year ago
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!
Project.copy
instead of Copy
taskReference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.9.2
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"))
ℹ️ 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")
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")
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 (⚠️ Experimental⚠)
<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")
Published by skuzzle over 1 year ago
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:
@SnapshotDirectory
is not allowed anymore on test methods, only on test classMarshallerSupplier
functional interface is not publicDirectoriesFrom.recursive()
PathFilter
in favor of TestFileFilter
and TestDirectoryFilter
XmlSnapshot.withEnableXPathDebugging(true)
)SnapshotException
is now an unchecked exception2.14.2
(coming from 2.10.5
)Reference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.9.1
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"))
ℹ️ 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")
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")
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 (⚠️ Experimental⚠)
<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")
Published by skuzzle almost 2 years ago
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:
Snapshot
a top-level type in de.skuzzle.test.snapshot
and deprecate de.skuzzle.test.snapshot.SnapshotDsl.Snapshot
disabled
assertion and no failed assertions will properly be marked as 'skipped' by the test framework5.9.2
(coming from 5.9.1
)ContextFiles
class which groups the paths to all generated filesSnapshotTestResult.targetFile()
, SnapshotTestResult.actualResultFile()
and SnapshotTestResult.rawActualResultFile()
in favor of SnapshotTestResult.contextFiles()
disabledBecause(String)
terminal DSL operation. The string can be used to leave an informative message to readers so they know why the assertion is disabledReference documentation for this release: https://skuzzle.github.io/snapshot-tests/reference/1.8.0
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"))
ℹ️ 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")
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")
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 (⚠️ Experimental⚠)
<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")
Published by skuzzle almost 2 years ago
XmlUnitStructuralAssertions
instead of specialized HtmlStructuralAssertions
Maven Central coordinates for this release:
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"))
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")
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")
Published by skuzzle almost 2 years ago
@EnabledSnapshotTests
annotation in favor of annotation with same name within junit5
packageEnableSnapshotTests.softAssertions
. Soft assertions will no longer be supported in the next major versionsnapshot-tests-jaxb-jakarta
moduleSnapshotTestOptions
annotation which allows to configure some detailed aspects of the snapshot engineEnableSnapshotTests.snapshotDirectory
in favor of new annotation @SnapshotDirectory
SnapshotTestResult.serializedSnapshot()
in favor of SnapshotTestResult.snapshotFile()
SnapshotTestResult.serializedActual()
SnapshotTestResult.actualResultFile()
SnapshotTestResult.rawActualResultFile()
@SnapshotTestOptions.textDiffContextLines()
.snapshot
file via @SnapshotTestOptions.alwaysPersistActualResult()
.snapshot
file via @SnapshotTestOptions.alwaysPersistRawResult()
. The raw result does not contain the snapshot header information.@Nested
tests (general support for @Nested
is still experimental though)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:
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"))
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")
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")
Published by skuzzle almost 2 years ago
DirectoriesFrom.directory
should not be mandatoryMaven Central coordinates for this release:
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"))
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")
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")
Published by skuzzle almost 2 years ago
XmlSnapshot.withEnableXPathDebugging(...)
and HtmlSnapshot.withEnableXPathDebugging(...)
to print results of applying custom comparison rulestoString()
of TestFile
and TestDirectory
contain full absoulte path to the file instead of just the file nameFilesFrom.directory
in favor of FilesFrom.testResourcesDirectory
and FilesFrom.projectDirectory
DirectoriesFrom.directory
in favor of DirectoriesFrom.testResourcesDirectory
and DirectoriesFrom.projectDirectory
Maven Central coordinates for this release:
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"))
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")
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")
Published by skuzzle almost 2 years ago
AssertionError
if actual snapshot input is nullMaven Central coordinates for this release:
⚠ The published BOM is currently broken. See Issue #42 ⚠
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.5.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.5.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.5.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.5.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.5.0")
If you need HTML based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-html</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.5.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.5.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.5.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.5.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.5.0")
Published by skuzzle about 2 years ago
StructuredDataProviders
(see Deprecations below)XmlSnapshot.inferJaxbContext()
in favor of XmlSnapshot.xml()
XmlSnapshot.with(JAXBContext)
in favor of XmlSnapshot.xml().withJAXBContext(JAXBContext)
JsonSnapshot.withDefaultObjectMapper()
in favor of JsonSnapshot.json()
JsonSnapshot.withObjectMapper(ObjectMapper)
in favor of JsonSnapshot.json(ObjectMapper)
Maven Central coordinates for this release:
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.4.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.4.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.4.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.4.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.4.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.4.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.4.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.4.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.4.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.4.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.4.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.4.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.4.0")
Published by skuzzle over 2 years ago
TestFile.asText()
which defaults to use UTF-8 as file encodingObjectMemberAction.replaceConsistently
ObjectMemberAction.replaceConsistently
Maven Central coordinates for this release:
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.3.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.3.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.3.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.3.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.3.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.3.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.3.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.3.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.3.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.3.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.3.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.3.0")
Published by skuzzle over 2 years ago
Note: When running your tests with this version for the first time, you will see that your snapshot files are being
changed because we introduced a new header field. You can and safely check in these changes into your SCM.
1.2.2
where the framework ends up in unrecoverable condition after a snapshot test failedElementType.METHOD
from @EnableSnapshotTests
Maven Central coordinates for this release:
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.2.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.2.3"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.2.3'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.2.3")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.2.3'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.2.3")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.2.3'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.2.3")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.2.3'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.2.3")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.2.3</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.2.3'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.2.3")
Published by skuzzle over 2 years ago
Note: When running your tests with this version for the first time, you will see that your snapshot files are being
changed because we introduced a new header field. You can and safely check in these changes into your SCM.
Maven Central coordinates for this release:
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.2.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.2.2"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.2.2'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.2.2")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.2.2'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.2.2")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.2.2'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.2.2")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.2.2'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.2.2")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.2.2'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.2.2")
Published by skuzzle over 2 years ago
Maven Central coordinates for this release:
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.2.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.2.1"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.2.1'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.2.1")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.2.1'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.2.1")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.2.1'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.2.1")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.2.1'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.2.1")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.2.1'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.2.1")
Published by skuzzle over 2 years ago
IllegalArgumentException
instead of NullPointerException
when validating parameters.JAXBElement
when they are not annotated with @XmlRootObject
.TestFile
injected in parameterized tests now has a sibling(String)
and siblingWithExtension(String)
method.@DirectoriesFrom
annotation which iterates directories and injects them as TestDirectory
into test methods.filter
attribute to the @FilesFrom
annotation to specify a PathFilter
implementation. Allows for more fine grained filtering control.snapshot.in(pathToDirectory).assertThat(...)
.Maven Central coordinates for this release:
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.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.2.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.2.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.2.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.2.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.2.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.2.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.2.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.2.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.2.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.2.0")
Published by skuzzle over 2 years ago
@ParameterizedTest
)EnableSnapshotTests.forceUpdateSnapshots
in favor of new @ForceUpdateSnapshots
annotationforceUpdateSnapshots
is enabled@DeleteOrphanedSnapshots
annotation can be placed on the test class in order to delete orphaned filesMaven Central coordinates for this release:
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.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.1.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.1.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.1.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.1.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.1.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.1.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.1.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.1.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.1.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.1.0")
Published by skuzzle over 2 years ago
This is the first major release! Please watch out for ApiGuardian @API
annotation when using public API. Some
classes/methods are still marked as experimental and thus elligible to change during a minor release.
-DforceUpdateSnapshots
to the JVMJSONComparator
instance when structurally comparing JSON snapshotsMaven Central coordinates for this release:
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.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.0.0"))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.0.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.0.0")
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.0.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.0.0")
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.0.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.0.0")
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.0.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.0.0")
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.0.0")
Published by skuzzle over 2 years ago
XmlSnapshot.compareUsing(Consumer<CompareAssert>)
Maven Central coordinates for this release:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-bom</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation(platform('de.skuzzle.test:snapshot-tests-bom:0.0.7'))
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:0.0.7'
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:0.0.7'
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:0.0.7'
Directory Params
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:0.0.7'
Object normalization
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>0.0.7</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:0.0.7'
Published by skuzzle almost 3 years ago
@SnapshotAssertions
to @EnableSnapshotTests
(breaking)Maven Central coordinates for this release:
If you only need text based snapshots:
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>0.0.6</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-core:0.0.6'
If you need json based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>0.0.6</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:0.0.6'
If you need xml based snapshots (includes -core
):
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>0.0.6</version>
<scope>test</scope>
</dependency>
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:0.0.6'