February 2015
Intermediate to advanced
338 pages
8h 16m
English
Cucumber is a testing tool, and it’s in the Java code of a step definition where our tests find out whether a step has succeeded in whatever it set out to do. So, how does a step definition tell Cucumber whether it passed or failed?

Like most other testing tools, Cucumber uses exceptions to communicate the failure of a test. As it executes a scenario, one step at a time, Cucumber assumes that a step has passed unless its step definition throws an exception. If the exception thrown is a PendingException, then the step is marked as pending—all other exceptions cause the step to fail. ...