What We Just Learned

Working with legacy code is always a challenge, but you can use Cucumber tests to help make it a much more enjoyable challenge.

  • Be pragmatic! Don’t exhaust yourself trying to retrofit a complete set of Cucumber features for everything the system already does. Instead, add them gradually, one at a time, as you need them.

  • Use characterization tests to help you understand what the system is already doing and to give you some security before you make a change.

  • Every time you discover a bug, trap it with a new Cucumber scenario. Every time you add new behavior to the system, start by describing it with a Cucumber feature.

  • Use code coverage to give you and your team feedback and encouragement about your progress in getting the system under test.

  • Enjoy the newfound confidence with which you can refactor and clean up the code that’s covered by the tests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.173.238