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: Add scenario outline
From the course: Cucumber Essential Training
Scenario outline: Add scenario outline
- [Instructor] Scenario Outline. Worksheets are powerful tools to do data-driven testing. Each test scenario could be documented as a row in a worksheet. You could have multiple input values as shown in the spreadsheet. Output or outputs can be listed and compared with the expected outputs to mark a test case as passed or failed. Wouldn't it be nice to have a structure similar to this table in Cucumber? There is already a Cucumber construct that works similarly. It's called Scenario Outline. Here is an example of a Scenario Outline. As you can see, syntactically this is very similar to a scenario that we are already familiar with. It is driven by a table specified with the keyword, examples. Different rows in this table are run one by one to execute different test scenarios. Let's see Scenario Outline in action. I'll go ahead and define a new feature file and I'm going to call this feature file ScenarioOutlineExamples. I'll go ahead and delete all the text that is created here and in…
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)
-
-
-