Running Automated Tests in Parallel with TestNG

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.

Continue reading from source link

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s