Skip to content

Commit

Permalink
Merge branch 'release/1.6.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Nov 21, 2022
2 parents 4d5fdc5 + 501253c commit 52f457c
Show file tree
Hide file tree
Showing 35 changed files with 721 additions and 120 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ target
# IntelliJ
.idea/
*.iml
.flattened-pom.xml
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- This file is auto generated during release from readme/README.md -->

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.5.0/jar)
[![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-core/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.6.0/jar)
[![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-core/1.6.0)
[![Coverage Status](https://coveralls.io/repos/github/skuzzle/snapshot-tests/badge.svg?branch=main)](https://coveralls.io/github/skuzzle/snapshot-tests?branch=main)
[![Twitter Follow](https://img.shields.io/twitter/follow/skuzzleOSS.svg?style=social)](https://twitter.com/skuzzleOSS)

Expand All @@ -13,17 +13,17 @@ serialized version of the object during the first test execution and during subs
actual object against the stored snapshot.

Supported snapshot formats:
- [x] generic plain text via [snapshot-tests-core](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-core/1.5.0/jar)
- [x] Json via [snapshot-tests-jackson](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jackson/1.5.0/jar)
- [x] XML via [snapshot-tests-jaxb](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jaxb/1.5.0/jar)
- [x] HTML via [snapshot-tests-html](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-html/1.5.0/jar)
- [x] generic plain text via [snapshot-tests-core](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-core/1.6.0/jar)
- [x] Json via [snapshot-tests-jackson](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jackson/1.6.0/jar)
- [x] XML via [snapshot-tests-jaxb](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jaxb/1.6.0/jar)
- [x] HTML via [snapshot-tests-html](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-html/1.6.0/jar)

Read more about snapshot testing in this accompanying [blog post](https://simon.taddiken.net/the-case-for-snapshot-testing/).

### Latest Maven Central coordinates

Please check out the GitHub release page to find Maven & Gradle coordinates for the latest
release [1.5.0](https://github.com/skuzzle/snapshot-tests/releases/tag/v1.5.0)
release [1.6.0](https://github.com/skuzzle/snapshot-tests/releases/tag/v1.6.0)

## Quick start
_(assumes using `snapshot-tests-jackson` artifact)_
Expand Down
69 changes: 34 additions & 35 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,140 +1,139 @@
* [#23](https://github.com/skuzzle/snapshot-tests/issues/33): Allow to configure strictness of JSON comparison
* [#34](https://github.com/skuzzle/snapshot-tests/issues/34): Support for HTML snapshots
* [#36](https://github.com/skuzzle/snapshot-tests/issues/36): Throw proper `AssertionError` if actual snapshot input is null
* [#37](https://github.com/skuzzle/snapshot-tests/issues/37): Improve rendering of huge diffs by leaving out large unchanged parts
* [#39](https://github.com/skuzzle/snapshot-tests/issues/39): Detect incomplete/illegal DSL usages
* [#40](https://github.com/skuzzle/snapshot-tests/issues/40): Allow to gracefully disable snapshot assertions
* Build against JUnit 5.9.1 (coming from 5.8.2)
* Clean up dependencies
* [#42](https://github.com/skuzzle/snapshot-tests/issues/42): Publish flattened version of our artifact to fix BOM distribution
* [#43](https://github.com/skuzzle/snapshot-tests/issues/43): Allow XML structure comparison for String input
* Add `XmlSnapshot.withEnableXPathDebugging(...)` and `HtmlSnapshot.withEnableXPathDebugging(...)` to print results of applying custom comparison rules
* Fixed bugs and performance issues in XPath comparison engine
* `toString()` of `TestFile` and `TestDirectory` contain full absoulte path to the file instead of just the file name
* Deprecate `FilesFrom.directory` in favor of `FilesFrom.testResourcesDirectory` and `FilesFrom.projectDirectory`
* Deprecate `DirectoriesFrom.directory` in favor of `DirectoriesFrom.testResourcesDirectory` and `DirectoriesFrom.projectDirectory`


Maven Central coordinates for this release:

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

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.5.0/jar)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.6.0/jar)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-bom</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
```

```
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.5.0"))
testImplementation(platform("de.skuzzle.test:snapshot-tests-bom:1.6.0"))
```

## Artifacts
If you only need text based snapshots:

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-core/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-core/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-core/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-core/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-core</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-core:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-core:1.6.0")
```

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

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jackson/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-jackson/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jackson/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-jackson/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jackson</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-jackson:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-jackson:1.6.0")
```

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

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jaxb/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-jaxb/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jaxb/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-jaxb/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-jaxb</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-jaxb:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-jaxb:1.6.0")
```

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

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-html/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-html/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-html/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-html/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-html</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-html:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-html:1.6.0")
```

## Experimental
Directory Params

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-directory-params/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-directory-params/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-directory-params/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-directory-params/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-directory-params</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-directory-params:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-directory-params:1.6.0")
```

Object normalization

[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.5.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-normalize/1.5.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.5.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-normalize/1.5.0)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.0&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-normalize/1.6.0/jar) [![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.0&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-normalize/1.6.0)

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.5.0</version>
<version>1.6.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")
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.6.0'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.6.0")
```
40 changes: 35 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.skuzzle</groupId>
Expand All @@ -10,7 +9,7 @@

<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
<packaging>pom</packaging>

<name>Snapshot Tests Parent</name>
Expand Down Expand Up @@ -44,7 +43,6 @@
<version.equals-verifier>3.9</version.equals-verifier>
<version.archunit>0.22.0</version.archunit>
<version.api-guardian>1.1.2</version.api-guardian>

</properties>

<modules>
Expand All @@ -58,10 +56,10 @@
<module>snapshot-tests-xmlunit</module>
<module>snapshot-tests-directory-params</module>
<module>snapshot-tests-common</module>
<module>snapshot-tests-release-test</module>
</modules>

<build>

<pluginManagement>
<plugins>
<plugin>
Expand All @@ -75,6 +73,12 @@
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.3.0</version>
</plugin>
</plugins>
</pluginManagement>

Expand Down Expand Up @@ -111,6 +115,32 @@
<releaseNotes>RELEASE_NOTES.md</releaseNotes>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
15 changes: 7 additions & 8 deletions readme/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
* [#23](https://github.com/skuzzle/snapshot-tests/issues/33): Allow to configure strictness of JSON comparison
* [#34](https://github.com/skuzzle/snapshot-tests/issues/34): Support for HTML snapshots
* [#36](https://github.com/skuzzle/snapshot-tests/issues/36): Throw proper `AssertionError` if actual snapshot input is null
* [#37](https://github.com/skuzzle/snapshot-tests/issues/37): Improve rendering of huge diffs by leaving out large unchanged parts
* [#39](https://github.com/skuzzle/snapshot-tests/issues/39): Detect incomplete/illegal DSL usages
* [#40](https://github.com/skuzzle/snapshot-tests/issues/40): Allow to gracefully disable snapshot assertions
* Build against JUnit 5.9.1 (coming from 5.8.2)
* Clean up dependencies
* [#42](https://github.com/skuzzle/snapshot-tests/issues/42): Publish flattened version of our artifact to fix BOM distribution
* [#43](https://github.com/skuzzle/snapshot-tests/issues/43): Allow XML structure comparison for String input
* Add `XmlSnapshot.withEnableXPathDebugging(...)` and `HtmlSnapshot.withEnableXPathDebugging(...)` to print results of applying custom comparison rules
* Fixed bugs and performance issues in XPath comparison engine
* `toString()` of `TestFile` and `TestDirectory` contain full absoulte path to the file instead of just the file name
* Deprecate `FilesFrom.directory` in favor of `FilesFrom.testResourcesDirectory` and `FilesFrom.projectDirectory`
* Deprecate `DirectoriesFrom.directory` in favor of `DirectoriesFrom.testResourcesDirectory` and `DirectoriesFrom.projectDirectory`


Maven Central coordinates for this release:
Expand Down
20 changes: 17 additions & 3 deletions snapshot-tests-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</parent>

<artifactId>snapshot-tests-bom</artifactId>
Expand Down Expand Up @@ -59,4 +58,19 @@
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<updatePomFile>true</updatePomFile>
<pomElements>
<dependencyManagement>expand</dependencyManagement>
</pomElements>
</configuration>
</plugin>
</plugins>
</build>
</project>
4 changes: 2 additions & 2 deletions snapshot-tests-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</parent>

<artifactId>snapshot-tests-common</artifactId>
<packaging>jar</packaging>

<name>Snapshot Tests Common Utilities</name>
<description></description>
<description>Common utilities</description>

<properties>
<automatic-module-name>de.skuzzle.test.snapshots.common</automatic-module-name>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</parent>

<artifactId>snapshot-tests-core</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions snapshot-tests-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</parent>

<artifactId>snapshot-tests-dependencies</artifactId>
<packaging>pom</packaging>

<name>Snapshot Tests Internal Dependency Management</name>
<description></description>
<description>Internal dependency management</description>

<dependencyManagement>
<dependencies>
Expand Down
Loading

0 comments on commit 52f457c

Please sign in to comment.