0

I am using cucumber for my test,my suite file looks like the following:

<suite name="xx" verbose="0" parallel="none">
<listeners>blabla........</listeners>
<test name="TestIwantToRunManyTime" enabled="true">
<groups><run><include name="@myTest"></run></groups>

How to configured it to run test @myTest for 5 times?

Quaffel
  • 1,463
  • 9
  • 19
amber
  • 1
  • 1

1 Answers1

0

If you are using cucumber then why you are trying to do this using TestNG.

You can use cucumber itself.

Example:

@myTest
Scenario Outline: Create ABC

  Given I open the application

  When I enter username as <username>

  And I enter password as <password>

  Then I enter title as <title>

  And press submit


Examples:

| username | password | title |

| Rob      | xyz1      | title1 |

| Bob      | xyz1      | title2 |

So here the same scenario will run 2 times as example table have 2 data, you can add as many data table and cucumber will execute that number of times

You can use tag also in cucumber like @myTest

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125