You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using aspects to skip the execution of scenarios based on tags (like the @ignore tag), this probably can also be done directly from the cucumber hooks by throwing a TestNG SkipException
@Before(order = 0, value = "@test")
public void testSkip() throws Exception {
throw new SkipException("Skipping as it contains the @test tag");
}
Sadly, not all tags that make use of aspects can be transformed into this format (like @include, @runOnEnv, or things like that), but the new @jira tag could benefit from this. Currently, when running scenarios directly in IntelliJ IDEA (which is the preferred method by some QAs because it makes debugging easier), Aspects are ignored (among them the @jira tag). If we move the functionality to a hook, this won't happen.
Moving some functionality from aspects to hooks would IMO make maintenance easier, since aspect are complicated to debug and maintain and the APIs used for the pointcuts may change in new versions of Cucumber.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Instead of using aspects to skip the execution of scenarios based on tags (like the @ignore tag), this probably can also be done directly from the cucumber hooks by throwing a TestNG SkipException
Sadly, not all tags that make use of aspects can be transformed into this format (like @include, @runOnEnv, or things like that), but the new @jira tag could benefit from this. Currently, when running scenarios directly in IntelliJ IDEA (which is the preferred method by some QAs because it makes debugging easier), Aspects are ignored (among them the @jira tag). If we move the functionality to a hook, this won't happen.
Moving some functionality from aspects to hooks would IMO make maintenance easier, since aspect are complicated to debug and maintain and the APIs used for the pointcuts may change in new versions of Cucumber.
@oleksandr0001
Beta Was this translation helpful? Give feedback.
All reactions