Replies: 1 comment 2 replies
-
I have never tried this library with Cucumber. Cucumber uses shared steps with actual tests being written in Gherkin syntax. As there is no uniqueness with the Java Test method it won't be able to identify the comparator test correctly. You would be forced using @SnapshotName or an equivalent to uniquely identity each test - this may require some small modifications to java-snapshot-testing. So unfortunately, unless you implement Gherkin integration and annotation it probably won't work. You might be able to hooking the "Scenario" keyword for the snapshot name |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since Cucumber has its own test runner; annotating on the step class won't extend or change the cucumber test runner to be able to inject
Expect expect
instance variable.Could you please share guidance/example of how to use this library in Cucumber steps?
Expect expect = Expect.of()
requires ajava.lang.reflect.Method method
which I don't think is accessible in Cucumber steps.Beta Was this translation helpful? Give feedback.
All reactions