From the course: Cucumber Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Scenario outline: Adding examples table

Scenario outline: Adding examples table

From the course: Cucumber Essential Training

Start my 1-month free trial

Scenario outline: Adding examples table

- [Instructor] So, I'll go ahead and change this variable name to call it initial bill amount. This qualifies it a little bit further. And under examples, let's go ahead and supply our data. So, I'm going to start with a pipe, and initial bill amount, tax rate, and calculated bill amount, and we need to end this line with a pipe. Let's define our different scenarios here. So, for $100 bill, if my tax rate is 10%, then my tax amount will be 10 and total will be $110. Let's define another one here. If we have a $200 bill and my tax rate is 8%, my tax amount will be $16, so my total should be $216. And I need to make sure I end each of these lines with a pipe. The third thing I need to do is, this time, I'm going to introduce fractional numbers. So if my initial bill amount is $100 and my tax rate is 1.55%, then the total should be $101.55, and I'm going to end it with a pipe. I will go ahead and format this table. The next step is to generate steps for this. As you can see in our…

Contents