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
Even though Cucumber itself provides hooks to clean up any mess created by every test, I'm missing a simple solution
to tidy up some leftovers of a special test case.
99% percent of our test behave in a good manner and don't leave anything behind or the app in question in a bad shape
however, there are a few tests that require a cleaning crew.
ATM we just add a And/Then step to the end of the scenario
✨ What's your proposed solution?
Adding an AFTER step to the Gherkin keywords that behaves as Background just after a scenario is finished.
⛏ Have you considered any alternatives or workarounds?
Yes, using the after* hooks with much extra logic to determine if the hook is even needed to execute.
📚 Any additional context?
Dunno yet, let me know if you need more.
PS. Adding the keyword is not the end of the story as all the different language implementations of parsing and executing Gherkin need to support it as well, but I thought this is the best place to start.
Thx
The text was updated successfully, but these errors were encountered:
Cleanup of a scenario should be invisible and not documented in the scenario proper. So like @ehuelsmann said above. You should be using standard hooks for tidy up. So a standard After hook should suffice, with either tagged or conditional logic
🤔 What's the problem you're trying to solve?
Even though Cucumber itself provides hooks to clean up any mess created by every test, I'm missing a simple solution
to tidy up some leftovers of a special test case.
99% percent of our test behave in a good manner and don't leave anything behind or the app in question in a bad shape
however, there are a few tests that require a cleaning crew.
ATM we just add a
And
/Then
step to the end of the scenario✨ What's your proposed solution?
Adding an
AFTER
step to the Gherkin keywords that behaves asBackground
just after a scenario is finished.⛏ Have you considered any alternatives or workarounds?
Yes, using the after* hooks with much extra logic to determine if the hook is even needed to execute.
📚 Any additional context?
Dunno yet, let me know if you need more.
PS. Adding the keyword is not the end of the story as all the different language implementations of parsing and executing Gherkin need to support it as well, but I thought this is the best place to start.
Thx
The text was updated successfully, but these errors were encountered: