June 2017
Intermediate to advanced
256 pages
5h 38m
English
A picture speaks a thousand words, but in our case it can save a thousand seconds. It's a good practice to take an image at the point of test failure as it will help us save a lot of time, which is needed to go through the error logs. Also, sometimes images are needed as part of the test case itself. Here are two approaches:
Embedding a snapshot in a cucumber report becomes fa+irly easy. Cucumber exposes you to the Scenario interface, which makes it slightly easier to query whether the scenario has failed or passed. For example, refer to the following snapshot of code; we are doing the following step by step:
Read now
Unlock full access