Hi! My name is Christian, an Agile Software Developer, living in Trento (IT).
I am currently working at XPeppers.
Read more about me.

Debugging acceptance tests with Angular and Cucumber

,
by

Share on Twitter

I found myself quite helpless when debugging acceptance tests of any kind. One trick I found useful if you can’t understand where the problem could be and want to ‘see’ what the web driver is seeing, is to add the following step definition to your web driver configuration:

Then /^show me the page/ do
  print page.html
end

and use it like this to at least have a small clue what’s going on:

@javascript
Scenario: controlling order
  Given there are 12 cucumbers
  Then show me the page
  When I eat 5 cucumbers
  Then I should have 7 cucumbers