Skip to content

Commit 57d8321

Browse files
committed
Update README
1 parent 718e65c commit 57d8321

1 file changed

Lines changed: 31 additions & 16 deletions

File tree

README.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[![Build Status](https://github.com/origin-energy/java-snapshot-testing/workflows/build/badge.svg)](https://github.com/origin-energy/java-snapshot-testing/actions)
2-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.origin-energy/java-snapshot-testing-core/badge.svg)](https://search.maven.org/artifact/io.github.origin-energy/java-snapshot-testing-core/3.2.7/jar)
2+
[![JitPack](https://jitpack.io/v/origin-energy/java-snapshot-testing.svg)](https://jitpack.io/#origin-energy/java-snapshot-testing)
33

44
# Java Snapshot Testing
55
- Inspired by [facebook's Jest framework](https://facebook.github.io/jest/docs/en/snapshot-testing.html)
66

7-
🎉 4.0.0 is out
7+
🎉 4.+ is out
88

99
## Upgrading
1010
- Upgrade guide from 3.X to 4.X [here](https://github.com/origin-energy/java-snapshot-testing/discussions/94)
@@ -25,19 +25,23 @@ Then java-snapshot-testing might just be what you are looking for!
2525
1. Add test dependencies
2626

2727
```groovy
28+
repositories {
29+
maven { url 'https://jitpack.io' }
30+
}
31+
2832
// In this case we are using the JUnit5 testing framework
29-
testImplementation 'io.github.origin-energy:java-snapshot-testing-junit5:4.+'
33+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-junit5:4.+'
3034
3135
// slf4j logging implementation if you don't already have one
3236
testImplementation("org.slf4j:slf4j-simple:2.0.0-alpha0")
3337
3438
// Optional: Many will want to serialize into JSON. In this case you should also add the Jackson plugin
35-
testImplementation 'io.github.origin-energy:java-snapshot-testing-plugin-jackson3:4.+'
39+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-plugin-jackson3:4.+'
3640
testImplementation 'tools.jackson.core:jackson-core:3.1.0'
3741
testImplementation 'tools.jackson.core:jackson-databind:3.1.0'
3842
3943
// For Jackson 2 use the dedicated plugin and serializer classes instead
40-
testImplementation 'io.github.origin-energy:java-snapshot-testing-plugin-jackson:4.+'
44+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-plugin-jackson:4.+'
4145
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.11.3'
4246
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.11.3'
4347
@@ -142,34 +146,45 @@ data.
142146
- Does not give great insight to why the snapshot failed
143147
- Can be difficult to troll though large snapshot changes where you might only be interested in a small set of fields
144148

145-
## Installation [Maven](https://search.maven.org/search?q=java-snapshot-testing)
149+
## Installation [JitPack](https://jitpack.io/#origin-energy/java-snapshot-testing)
150+
151+
Add JitPack to your build repositories:
146152

147-
These docs are for the latest `-SNAPSHOT` version published to maven central. Select the tag `X.X.X` matching your maven
148-
dependency to get correct documentation for your version.
153+
```groovy
154+
repositories {
155+
maven { url 'https://jitpack.io' }
156+
}
157+
```
158+
159+
Then add the module for your test framework. The `4.+` version uses the latest available 4.x release.
149160

150161
Only if you want to integrate with an unsupported framework. [Show me how!](#using-an-unsupported-framework)
151162

152-
- [Core](https://search.maven.org/search?q=a:java-snapshot-testing-core)
163+
```groovy
164+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-core:4.+'
165+
```
153166

154167
We currently support:
155168

156-
- [JUnit4](https://search.maven.org/search?q=a:java-snapshot-testing-junit4)
157-
- [JUnit5](https://search.maven.org/search?q=a:java-snapshot-testing-junit5)
158-
- [Spock](https://search.maven.org/search?q=a:java-snapshot-testing-spock)
169+
```groovy
170+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-junit4:4.+'
171+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-junit5:4.+'
172+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-spock:4.+'
173+
```
159174

160175
Plugins
161176

162-
- [Jackson for JSON serialization](https://search.maven.org/search?q=a:java-snapshot-testing-plugin-jackson)
163-
- [Jackson 3 for JSON serialization](https://search.maven.org/search?q=a:java-snapshot-testing-plugin-jackson3)
177+
- Jackson for JSON serialization
178+
- Jackson 3 for JSON serialization
164179
- You need jackson on your classpath (Gradle example)
165180
```groovy
166181
// Jackson 2 plugin
167-
testImplementation 'io.github.origin-energy:java-snapshot-testing-plugin-jackson:4.+'
182+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-plugin-jackson:4.+'
168183
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.11.3'
169184
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.11.3'
170185
171186
// Jackson 3 plugin
172-
testImplementation 'io.github.origin-energy:java-snapshot-testing-plugin-jackson3:4.+'
187+
testImplementation 'com.github.origin-energy.java-snapshot-testing:java-snapshot-testing-plugin-jackson3:4.+'
173188
testImplementation 'tools.jackson.core:jackson-core:3.1.0'
174189
testImplementation 'tools.jackson.core:jackson-databind:3.1.0'
175190
```

0 commit comments

Comments
 (0)