Skip to content
Igor Gursky edited this page Sep 26, 2016 · 1 revision

In case you want re-use the same test with different input data or assertions, you might want to take a look at the "Scenario Outline".

If Scenario is defined as "Outline", it must contain "Examples" section under the scenario body. At the same time, parameters are put into "<>" brackets in the scenario. In the following example, scenario will be executed twice.

Scenario Outline: Parametrized test

Given accept "<type>" mediaTypes
When the client performs GET request on /gadgets
Then status code is 200
And header "Content-Type" equal to "<type>"

Examples:
  | type             |
  | application/json |
  | application/xml  |
Clone this wiki locally