From the course: Cucumber Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Best practices
- [Tutor] Cucumber essentials best practices. One of the key considerations of writing scenarios is to stay at the right level of abstraction. Let's review this scenario. Given a user is on the generate bills web page when the user enters bill amount as $500 in the bill amount text box, and the user checks recalculate checkbox and so on and so forth. As you can see, this scenario is excessively procedural and coupled with user interface element dependencies. It also reads like a flowchart. What if this functionality was coded in a domain object? You will end up writing another scenario for your domain model. When writing scenarios, focus on business rules and concrete examples. How about this scenario? This is a bit too abstract and is no better than writing system shall calculate interest. Here is a recommendation for a scenario at the right level of abstraction. The reason I say a recommendation, and not the recommendation, is because there are multiple correct ways to write a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.