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
  • 10,806
  • 11
  • 61
  • 87

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
  • 47,282
  • 14
  • 68
  • 196