Be Genius


Bo Jeanes

I am an software engineer who has lived and worked in New York, Brisbane, Chicago, San Francisco, and now Melbourne. I primarily work in Ruby though am a functional programmer at heart and a fan of programming languages in general. In particular, I love Rust and Clojure but keep my eye on many langauges all the time.

Pausing Cucumber Scenarios to Debug

Continuing what I started with my post last light, I’ve got another tip for developing productively when using Cucumber.

I’m going to show you a simple way to pause cucumber stories in order to investigate the current state of your application at that point.

AfterStep('@pause') do
  print "Press Return to continue"

Then just tag any Cucumber feature or scenario with @pause. After the first step is run, the scenario will stop running and you can do whatever you like before proceeding.

My favourite tactic is to combine the @pause tag with @selenium tag to have WebDriver stop driving FireFox for a moment and let me click around in the application or inspect the HTML/CSS at that point.

My next post will be about enabling FireBug in the "WebDriver" profile to help inspecting the web page when you’ve paused a scenario.


  1. Hey! Complete n00bie here.. Which file do I add that code snippet to? Great blog by the way. Definitely learning stuff from you!

    by Kat Aquino on

You need to login with GitHub in order to comment.