1

Suppose I have test scenario with exact same requirements but one path variable change as follows:

Scenario: Some scenario

Given  path /mypath/param1
When method get
Then status 200

I need to run the same test for /mypath/param2, /mypath/param3 as well.

Is there a simpler way to do it without requiring to separate the feature into a separate file and using data driven test?

K. Siva Prasad Reddy
  • 11,786
  • 12
  • 68
  • 95

1 Answers1

2

Yes, use the Scenario Outline which is a standard Cucumber pattern.

Scenario Outline: Some scenario

Given  path /mypath/<param>
When method get
Then status 200

Examples:
| param |
| foo   |
| bar   |
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248