Skip to content
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

Streamline public API #68

Open
skuzzle opened this issue Feb 9, 2023 · 0 comments
Open

Streamline public API #68

skuzzle opened this issue Feb 9, 2023 · 0 comments

Comments

@skuzzle
Copy link
Owner

skuzzle commented Feb 9, 2023

Currently we provide a wild mix of possibilities to configure and fine tune the behavior of the snapshot test engine

  • Some aspects are configured via annotations only (see @SnapshotTestOptions annotation)
  • Some aspects can be configured via annotation but can be overridden in the DSL (i.e. @SnapshotTestDirectory)
  • Some annotations work on class level only, some work on class level and test method level (the latter taking precedence)
  • Some aspects can only be configured via DSL (i.e. snapshot naming)

Having stuff configured via annotations has the advantage that those information are static and its easier to use them for orphan detection (especially regarding the snapshot directory). Also it allows to easily share the configuration for all tests within the same class, which makes each test clearer and less cluttered.

On the other hand, those many annotations and their inconsistent semantics make the framework more complicated and the public API less discoverable.
The DSL as single entry point to all the functionality is pretty appealing in that regards.

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

No branches or pull requests

1 participant