From the course: Cucumber Essential Training
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Scenario outline: Implement code
From the course: Cucumber Essential Training
Scenario outline: Implement code
- [Instructor] Let's take a look at our method stubs. So, it looks like Cucumber has generated method stubs just like it did for our scenarios but there is a difference. If you look at Sales Tax Rate step, so this is Sales_Tax_Rate_is_Percentage, it has created two methods for it. One for Integer and the other one for Double and this is because if we go back to our ScenarioOutline, TaxRate is defined as 10 and eight for the first two rows but 1.55 for the third and that's why it has given us two different methods because it's going to capture these values as different data types. Let's go ahead and copy all these method stubs. I'll go ahead and define a new step definitions file and I'm going to call it ScenarioOutlineSteps. Let's go ahead and paste all these methods here. Let's bring all the inputs to fix any syntax errors and our method stubs are here. I'm not interested in steps such as I have a Customer, the stub that we are going to learn most about is all those columns…
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.
Contents
-
-
-
-
-
-
-
(Locked)
Data table: Adding a data table3m 17s
-
(Locked)
Data table: Read list of strings2m 23s
-
(Locked)
Data table: List of list of strings3m
-
(Locked)
Data table: List of maps3m 59s
-
(Locked)
Data table: Wrapping up1m 27s
-
(Locked)
Scenario outline: Add scenario outline3m 3s
-
(Locked)
Scenario outline: Adding examples table2m 17s
-
(Locked)
Scenario outline: Implement code4m 49s
-
(Locked)
Scenario outline: Running test2m 59s
-
(Locked)
-
-
-