Skip to content

Build a JUnit 5 Extension for the Snapshotmatcher Library #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rgordon1982
Copy link

This PR adds in a Junit5 Extension to easily use this great library when using JUnit5. The Extension @ExtendWith(SnapshotMatcherExtension.class) can be added at the class or individual test level. Once added, the SnapshotMatcher framework is initialized before each test and validated after each test runs.

It tries to takes advantage of JUnits Extension framework wherever possible. For instance, local state is now stored inside of the ExtensionContext which is local to each executed test. Also, config values can now be supplied as System properties and pulled out of the ExtensionContext (i.e. directory for snaps). Finally it adds support for Parameterized test and their dynamic test names.

…ds into SnapshotUtils

Moving state into ExecutionContext. Extracting config values from Jvm/ExecutionContext

Adding unit tests
@NicklasWallgren
Copy link

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants