QAutomation News / By Corina Pip
Running automated tests in parallel can be a time saver. When we have TestNG tests, we have multiple options for running our tests in such a way. We only need to perform a few simple configurations, as I will show in this article. There are 2 aspects I will be discussing: the first one refers to using data providers, while the second one implies that you are grouping and running tests using XML suite files.
Using data providers
Whenever a test method receives parameter values through a data provider method, we annotate the provider method with the ‘@DataProvider’ annotation. By default, we don’t specify any attribute to this annotation. With such a configuration, we are going to have the test run sequentially. This means the test method is invoked once, with one of the parameter values at a time. Once this current method + value combination finishes running, the next value is assigned to the test method and the test runs.