-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use annotations to mark test Specs and/or features as @RegTest or not. #6
Comments
@dexX7 Obviously this would be useful for Omni testing, as well. |
This is very nice! Potentially, this could also be used to get rid of the |
Well, there's another @mrhaki Spocklight article that may have a better solution for that case: Spocklight: Only Run Specs Based On Conditions. |
At least out of the box it's not as simple as adding: @Requires({ commandExists('abc') }) While it works with simple expressions such as |
If the method commandExists is a static method it should work in they way you described it. |
Using annotations and an external Spock configuration file, we should be able to mark test Specs or feature tests as requiring RegTest mode or not.
A test that has a
@RegTest
annotation would only run if the current functional/integration test configuration was running against a server in RegTest mode.See Spocklight: Including or Excluding Specifications Based On Annotations by @mrhaki.
So for example, the entire class BitcoinStepwiseSpec would have a
@RegTest
annotation. Whereas, BitcoinSpec would only user@RegTest
on feature test methods that usedgenerateBlock()
.The text was updated successfully, but these errors were encountered: