4

My case in Cucumber JVM,I need to run the entire "case.feature" file with 5 Scenarios set on Language 1, Locale 1 first time,and then run the same entire "case.feature" set on Language 2, Locale 2 second time ,is there a way to set this up ?

Example:

  1. Language 1 > English, Locale 1 > English (United States)
  2. Language 2 > Deutsch, Locale 2 > Deutsch
Shyam Rajan K
  • 59
  • 1
  • 7

1 Answers1

1

Use Scenario Outlines in cucumber in which the input you want can be in table format as shown below.

Scenario Outline: eating
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |  12   |  5  |  7   |
    |  20   |  5  |  15  |
selva
  • 1,175
  • 1
  • 19
  • 39
  • Thanks for the response, the example Scenario out line that you had given..the data table will be considered for that particular Scenario only? – Shyam Rajan K Jul 19 '16 at 17:36
  • The data table will repeat for different values which is in the table. you can use this for you Scenario also. – selva Jul 20 '16 at 10:46
  • i have edited my question above to be more specific about my requirement, kindly have a look into it. On using the above example, stepdef are created for each language, but i need 1st language to be set and execute the entire feature file 1st and then set 2nd language and execute the entire feature file again. Is there an way for what i am looking for ? – Shyam Rajan K Aug 09 '16 at 18:50