Skip to content

Commit

Permalink
Merge branch 'release/1.6.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Nov 23, 2022
2 parents 52f457c + deb5497 commit d17f682
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 63 deletions.
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.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)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.1&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.6.1/jar)
[![JavaDoc](https://img.shields.io/static/v1?label=JavaDoc&message=1.6.1&color=orange)](http://www.javadoc.io/doc/de.skuzzle.test/snapshot-tests-core/1.6.1)
[![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.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)
- [x] generic plain text via [snapshot-tests-core](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-core/1.6.1/jar)
- [x] Json via [snapshot-tests-jackson](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jackson/1.6.1/jar)
- [x] XML via [snapshot-tests-jaxb](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-jaxb/1.6.1/jar)
- [x] HTML via [snapshot-tests-html](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-html/1.6.1/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.6.0](https://github.com/skuzzle/snapshot-tests/releases/tag/v1.6.0)
release [1.6.1](https://github.com/skuzzle/snapshot-tests/releases/tag/v1.6.1)

## Quick start
_(assumes using `snapshot-tests-jackson` artifact)_
Expand Down
62 changes: 28 additions & 34 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,139 +1,133 @@
* [#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`
* Deprecated property `DirectoriesFrom.directory` should not be mandatory


Maven Central coordinates for this release:

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

[![Maven Central](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)
[![Maven Central](https://img.shields.io/static/v1?label=MavenCentral&message=1.6.1&color=blue)](https://search.maven.org/artifact/de.skuzzle.test/snapshot-tests-bom/1.6.1/jar)

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

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

## Artifacts
If you only need text based snapshots:

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

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

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

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

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

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

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

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

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

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

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

## Experimental
Directory Params

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

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

Object normalization

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

```xml
<dependency>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-normalize</artifactId>
<version>1.6.0</version>
<version>1.6.1</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")
testImplementation 'de.skuzzle.test:snapshot-tests-normalize:1.6.1'
testImplementation("de.skuzzle.test:snapshot-tests-normalize:1.6.1")
```
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

<name>Snapshot Tests Parent</name>
Expand Down
8 changes: 1 addition & 7 deletions readme/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
* [#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`
* Deprecated property `DirectoriesFrom.directory` should not be mandatory


Maven Central coordinates for this release:
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-common</artifactId>
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.6.0</version>
<version>1.6.1</version>
</parent>

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

<artifactId>snapshot-tests-dependencies</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-directory-params/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-directory-params</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* relative to the current project.
*/
@Deprecated(since = "1.6.0", forRemoval = true)
String directory();
String directory() default "";

/**
* The directory, relative to src/test/resources, from which to list the files. Mutual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class DirectoriesFromTest {

@ParameterizedTest
@DirectoriesFrom(directory = "test-directories")
@DirectoriesFrom(testResourcesDirectory = "test-directories")
void testDirectories(TestDirectory directory, Snapshot snapshot) throws IOException {
// Given
final String input1 = directory.resolve("input1.txt").asText(StandardCharsets.UTF_8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class FilesFromTest {

@ParameterizedTest
@FilesFrom(directory = "test-input", extensions = "txt")
@FilesFrom(testResourcesDirectory = "test-input", extensions = "txt")
void test(TestFile testFile, Snapshot snapshot) throws IOException {
// Given
final String testInput = testFile.asText(StandardCharsets.UTF_8, Map.of("variable", testFile.name()));
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-html/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-html</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-jackson</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-jaxb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-jaxb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-normalize/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-normalize</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-release-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-release-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion snapshot-tests-xmlunit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.skuzzle.test</groupId>
<artifactId>snapshot-tests-parent</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
</parent>

<artifactId>snapshot-tests-xmlunit</artifactId>
Expand Down

0 comments on commit d17f682

Please sign in to comment.