0

I have a script I need to run after all my cucumber test. What's the best way to do this? It seems like the After hook only applies to scenarios.

3

You can use the global hook at_exit:

at_exit do
  your script goes here
end

For example, in features\support\env.rb I typically have:

at_exit do
  browser.close
end

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.