I am looking for some thing like that:
@tag1
Feature : My new feature ....
@tag2
Scenario ...
And now I want to get hold of these tags to create a generic setup.
@Before
public void setup() {
String annotation = readAnnotation(...);
Is there any way to get hold of the annotation or annotations I have added to the features and/or scenarios my code is currently prcessing?
Pass the scenario object into the @before method. Then use getSourceTagNames() method of the scenario object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With