From 9def582070236caace4f8212df43c9a36c780ca4 Mon Sep 17 00:00:00 2001 From: Mathias Bernardeau Date: Tue, 30 Jan 2018 15:27:24 +0100 Subject: [PATCH 1/3] Add environment variable to activate snapshot writing --- .../com/zenika/snapshotmatcher/SnapshotMatcher.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/snapshot-matcher/src/main/java/com/zenika/snapshotmatcher/SnapshotMatcher.java b/snapshot-matcher/src/main/java/com/zenika/snapshotmatcher/SnapshotMatcher.java index 0bebe61..d5da91f 100644 --- a/snapshot-matcher/src/main/java/com/zenika/snapshotmatcher/SnapshotMatcher.java +++ b/snapshot-matcher/src/main/java/com/zenika/snapshotmatcher/SnapshotMatcher.java @@ -22,6 +22,9 @@ import difflib.Patch; public class SnapshotMatcher extends TypeSafeMatcher { + + private static final String SNAPSHOT_WRITE_VARIABLE = "test.snapshots.write"; + /** * Factory method to instantiate a snapshot matcher with the given type * @@ -48,11 +51,14 @@ public boolean matchesSafely(T o) { if (Files.exists(snapshotPath)) { // File exists => Compare snapshot file to given object return compareSnapshot(o, snapshotPath); - } else { + } else if (isWriteSnapshotActivated()) { // File doesn't exist => Create snapshot file and return true createSnapshot(o, snapshotPath); return true; } + System.out.println("Snapshot writing is not activated in this environment."); + System.out.println("Activate snapshot writing by using -D" + SNAPSHOT_WRITE_VARIABLE); + return false; } /** @@ -153,4 +159,7 @@ private StackTraceElement getCaller() { .orElse(null); } + private boolean isWriteSnapshotActivated() { + return System.getProperty(SNAPSHOT_WRITE_VARIABLE) != null; + } } From 1e330b4918e367bc42ee5b1d66ea3412d9248112 Mon Sep 17 00:00:00 2001 From: Mathias Bernardeau Date: Wed, 21 Feb 2018 14:19:54 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 16 ++++++++++++++++ writesnapshot-intellij.png | Bin 0 -> 16022 bytes 2 files changed, 16 insertions(+) create mode 100644 writesnapshot-intellij.png diff --git a/README.md b/README.md index ad864af..b102bd1 100644 --- a/README.md +++ b/README.md @@ -93,5 +93,21 @@ public class PlanetConverterTest { } ``` +## Activate snapshot writing +Snapshots must be written at the same time as the test. +It is necessary to avoid writing them in CI environments. + +To activate snapshot writing, pass the VM option `-Dtest.snapshots.write`. + +### With Maven +```bash +mvn -Dtest.snapshots.write test +``` + +### With Intellij +Set VM option inside Run configuration. + +![](./writesnapshot-intellij.png) + ## Limitations - Only one snapshot assertion per test method diff --git a/writesnapshot-intellij.png b/writesnapshot-intellij.png new file mode 100644 index 0000000000000000000000000000000000000000..3242ff37943597bfb8a819fb284392e4e08df62c GIT binary patch literal 16022 zcmaKT1ALs#+IQI4Y^(;2lg75yq_Nr9wrw|d(%44B#`-Yp0SJcX%{ki3MD5Rtr{ zwXvy%5eSHQXks#yQv4vM&pv$#Ssgz_e!!YA)l|Ve2-sIhTw)lq1Z-5lFnl#7UE1Oh zT@e)#3v*DzYQ10GBn!_yeql9qm=?ut5?}{MuICxf;Cb zCileWQHc1wV>1=3mKrYj+gGrJJ)HR%Kr;YHI-yydz$>hpgovBKb{)HFF_J|}W=6Q; zP%tw@Hy|So02RU(JY1r$81iq{m&%c)y2$W-gO#9gkcJ zGK?C=m6oZo#Y6V!wTA%zPE4dQCTaA?w|#8!c!&W?ONLsDLwW6#VE*4xcsn7Q0-D8k zG^~lk3cZEk9RBnf*o^2D(S+FfBXHCk;agDK14F&dZ;bwT%e`uo{&%WqeAL1fY`!bx zqv7~C%V}^}X-qnJA@+IO3DukGAJeP88^Jdrgn)n&Ay@gpHz+aS8-nO*$ax~Y6r8|( zz#{@Z^g%lLz#>G7iorwj5CQqPK`-t>gio+vd9drxT?}9<`^J09|09=8j*$e7+czDd zTLANgRxttulXw#+C*H>VM-~5-&<+g)fkQX8KUA&MD=*gyn44q&t1bNj;ZuKV z6G2taKzHhk4Iz6Y^Nbf^sRjGCbv@pVNOe(m0t&iL*laXP@lr7-l6$Pm(X%?`wj_Rq za+l3`v@3*%3Lk+-FyMPA?Jq=q+69Rd?zw^4Z8R}dimt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@VwYwdpx j@4pTy-d)!U@kZ!YDAx@Uz!~%YM*|5FS>XynUBCYa%IINz literal 0 HcmV?d00001 From 5c46e6fb8bd18dc533f3f1629955184d251d44c0 Mon Sep 17 00:00:00 2001 From: Mathias Bernardeau Date: Wed, 21 Feb 2018 14:28:01 +0100 Subject: [PATCH 3/3] :ok_hand: Fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b102bd1..573ab34 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ public class PlanetConverterTest { ``` ## Activate snapshot writing -Snapshots must be written at the same time as the test. +Snapshots must be written at the same time as the tests. It is necessary to avoid writing them in CI environments. To activate snapshot writing, pass the VM option `-Dtest.snapshots.write`. @@ -105,7 +105,7 @@ mvn -Dtest.snapshots.write test ``` ### With Intellij -Set VM option inside Run configuration. +Set VM option inside test run configuration. ![](./writesnapshot-intellij.png)