Hello All,
I have an requirement to merge the DataProviders and then feed to the Test
Steps :
@DataProvider
public Object[][] getData1() {
Object[][]a=TestUtil.getData(emp1xls, "TestCase_A3");
return a;
}
@DataProvider
public Object[][] getData2() {
Object[][]b=TestUtil.getData(emp1xls, "TestCase_A3");
return b;
}@DataProvider
public Object[][] merge(){
a+b
}
@Test(dataProvider="merge")
public void test(String Col1,String Col2.....){
}
if any one has idea , please share.
Thanks
Shaik
--
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 testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Hey - looks like this what my Cartesian Data Provider did:
http://www.theoryinpractice.net/post/29190379586/cartesian-data-providers
I never did get around to seeing if I could rip out the Guava dependency to submit it upstream did I?
Shaik - does this help you?
providerCounts (iterating once) Expected Result (which am looking for)
Peter - 53 - Blue - 0 Peter - 53 - Red- 0
Mary - 16 - Blue - 0 Mary - 16 - Blue
Paul - 25 - Blue - 0 Paul - 25 - Green
Peter - 53 - Green - 0 Mary - 16 - Blue
Mary - 16 - Green - 0
Paul - 25 - Green - 0
Peter - 53 - Red - 0
Mary - 16 - Red - 0
Paul - 25 - Red - 0
Thanks
Shaik
Ah, close - but you could probably adopt the code to get what you want. From what I can see, you're basically wanting a simple "zip" operation like you find in a lot of functional programming languages:
1) for each next Object[] in EACH request dataset
2) construct a new Object[], combing the two above
3) add that to a new collection
4) use it :)
--You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/lpuEaNcpY4A/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.