Tag Archives: dataprovider

The Automated Regression Suite. Part 3 of 3. How to run the suite

Once you have a regression suite set up, you will need to run it. When you have a smaller number of tests that need to be run on a specified day, that won’t be a problem, and the tests will successfully finish running within the allocated time period. However, as the suite becomes larger and larger, so does the amount of time required to run all the tests. In some cases, you can even get beyond a 24-hour test run. So, what can you do to optimize the test run time? You can use two strategies: parallelize and split. Continue reading The Automated Regression Suite. Part 3 of 3. How to run the suite

Quick Tip: Running automated tests in parallel

The What

I have a bunch of tests that i would like to run faster, by making them execute in parallel. In my tests:

  1. I am not using a DataProvider and only want to make the same test run several times.
  2. I am using a DataProvider and want my test to run with the provided values from the provider, but in parallel.
  3. I am not using DataProviders, but my tests are ran by using the textng.xml file that specifies which tests to run (as per this article).

Continue reading Quick Tip: Running automated tests in parallel

DataProviders for TestNG tests

When you need to run the same test a number of times, by changing only a few variable values, instead of writing several identical tests, you can use the dataProvider functionality offered by TestNG. What you have to do is declare a dataProvider method that returns a list of lists of objects, pass it to the test method, change the test method’s signature to correspond to the types of objects found in each inner list and run the test. Continue reading DataProviders for TestNG tests