Squashing Bugs
Our legacy application is big and mysterious, and we could spend an awfully long time writing characterization tests if we just started adding them aimlessly. So, assuming that we do want to grow our suite of automated tests, where should we start?
One of the best ways to start practicing with Cucumber is when you have a bug to fix. Bug reports generally come to you in the form of an example, so they’re nice and easy to translate into Cucumber scenarios. Using a bug report, work through the steps on the following list:
-
Translate the bug report into a Cucumber scenario. Show the scenario to the person who reported the bug, and ask that person whether it accurately describes what he or she was doing.
-
Wire up the step definitions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access