Run tests in parallel with multiple data from data provider

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Run tests in parallel with multiple data from data provider

praveen133t
Hi,

Let's say I have an list of numbers in a text file as below

one
two
three
four
five
six
.....
.....


I have a data provider that reads all the values in the above file and passes it on to the test case

@Test(dataProvider = "provideData")
public void paramTest(String number) {
  System.out.println("The number is : "+number);
}


Now my question is can I run the above test in parallel. Basically if my thread count is 6, there should be 6 tests running in parallel and provide the output in one shot and then next six should execute...so on?

Can you pls help me?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Run tests in parallel with multiple data from data provider

Yevhen Bilevych
Ten seconds googling returned this link: https://groups.google.com/forum/m/#!topic/testng-users/GNgndxHwe0Y, which is pretty about the same.

Sent from my BlackBerry® PlayBook™
www.blackberry.com


From: "talon" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: January 14, 2014 8:01 PM
Subject: [testng-users] Run tests in parallel with multiple data from data provider

Hi,

Let's say I have an list of numbers in a text file as below

one
two
three
four
five
six
.....
.....


I have a data provider that reads all the values in the above file and passes it on to the test case

@Test(dataProvider = "provideData")
public void paramTest(String number) {
  System.out.println("The number is : "+number);
}


Now my question is can I run the above test in parallel. Basically if my thread count is 6, there should be 6 tests running in parallel and provide the output in one shot and then next six should execute...so on?

Can you pls help me?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Run tests in parallel with multiple data from data provider

Harmin Parra Rueda
In reply to this post by praveen133t
Include this in your testng.xml file

<suite name="My suite" parallel="tests" thread-count="5">

On Tuesday, January 14, 2014 7:01:01 PM UTC+1, talon wrote:
Hi,

Let's say I have an list of numbers in a text file as below

one
two
three
four
five
six
.....
.....


I have a data provider that reads all the values in the above file and passes it on to the test case

@Test(dataProvider = "provideData")
public void paramTest(String number) {
  System.out.println("The number is : "+number);
}


Now my question is can I run the above test in parallel. Basically if my thread count is 6, there should be 6 tests running in parallel and provide the output in one shot and then next six should execute...so on?

Can you pls help me?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Run tests in parallel with multiple data from data provider

吴亭
In reply to this post by praveen133t

If I am not wrong, you could specify the thread number in the annotation

Try it

2014-1-14 下午7:01于 "talon" <[hidden email]>写道:
Hi,

Let's say I have an list of numbers in a text file as below

one
two
three
four
five
six
.....
.....


I have a data provider that reads all the values in the above file and passes it on to the test case

@Test(dataProvider = "provideData")
public void paramTest(String number) {
  System.out.println("The number is : "+number);
}


Now my question is can I run the above test in parallel. Basically if my thread count is 6, there should be 6 tests running in parallel and provide the output in one shot and then next six should execute...so on?

Can you pls help me?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.