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: Running test
From the course: Cucumber Essential Training
Scenario outline: Running test
- [Narrator] The next step is going to be, just outputting some of these values. Let's go ahead and fix our outputs here. So, this is expected value. And this is system calculated value. One last thing that I want to add here is, an assert statement. This statement will compare expected value with the system calculated value, and if both are equal our test would succeed. Otherwise, it would fail. So, I'm going to add statement like this. And, I'm going to put the statement here. Expected value equals system calculated value. Let me go ahead and add an import for this, and our method implementation is done. Let's go ahead and copy this code, and paste it to the other overload, for the final bill calculated amount. Which is here. I'm going to change this integer 'int1' parameter name, to expected value. This is coming from the scenario step. Let's go ahead and run our test. Looks like our test succeeded. If I look at the output I see that the total of three scenarios were run, with…
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)
-
-
-