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

Scenario outline: Add scenario outline

From the course: Cucumber Essential Training

Start my 1-month free trial

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…

Contents