@DataProvider(name = "ScreenFlowsFromExcel",indices = {2})
public static Iterator<Object[]> buildObjectFromExcel() throws Exception {
Iterator<Object[]> ;
int i=0;while (i<bundleValidationSize) {
testCaseArray = new TestDataIterator().CreateArrayFromExcel(testDatafilename, "WebFlowsController");
i+=1;
return testCaseArray.entrySet().stream().map(input -> new Object[]{input.getKey(), input.getValue()}).iterator();
}
return null;
}
Below is the test cases, the it will iterate through the Key Value pairs in the testCaseArray HashMap from TestCase1-17:
I didn’t quite understand what you are trying to solve. Can you please help rephrase/elaborate/explain more in a different way ?
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.com/
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/93cef56c-3bbd-4de3-8b93-04a6b0910467%40googlegroups.com.

@DataProvider(name = "ScreenFlowsFromExcel")
public static Iterator<Object[]> buildObjectFromExcel() throws Exception {
int i = 0;
while (i < bundleValidationSize) {
testCaseArray = new TestDataIterator().CreateArrayFromExcel(testDatafilename, "WebFlowsController");
i += 1;
return testCaseArray.entrySet().stream().map(input -> new Object[]{input.getKey(), input.getValue()} ).iterator();
}
This test case code below will execute the actions pertaining to Steps 1-17, this is calls the ActionExecutor, which is not important in this case and should'nt change
because it only goes to the worksheet for example "Login" and executes the steps to login to the application and so on, and works as expected.
@Test(dataProvider = "ScreenFlowsFromExcel",dependsOnMethods = { "DatasetFromExcel" })
//Commented out for Test Steps count 31012020
public void ScreenFlowsFromExcel(String testFlowExecution, ArrayList<LocatorModel> testStepsToExecute) throws Exception {
int testStepsEntryCount=0;
testStepsEntryCount = Integer.parseInt(System.getProperty("menu.count"));
testStepsEntryCount = testStepsEntryCount - 1;
for (LocatorModel testStepEntry : testStepsToExecute) {
executionSteps.webActionStepExecutor(mydriver, testStepEntry, testFlowExecution, testStepsEntryCount);
}
}
So this line of code from the data provider function is responsible for mapping each Test Case 1-17 to a k/v pair above in the Picture as it iterates through the WebFlowsController sheet.
>> return testCaseArray.entrySet().stream().map(input -> new Object[]{input.getKey(), input.getValue()} ).iterator();
But the reason for this while loop >> while (i < bundleValidationSize) { << is that I want this dataProvider function to loop 3 times or read WebFlowsController 3 more times so depending on
the BundleValidationSize (this just holds an integer value) if its 1 or 2 or 3, I want it to repeat Test Case IDs 1-17. I want it to come back here after steps 1-17 was completedand then repeat steps 1-17 again and so on.
Kindly let me know if this makes sense
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/BD6001AB-157C-47A7-8F1C-48B600BF689D%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/CAORL7Asg%3DFP2CvuXXWGMKS8tAWVWJRiNNqORs7CeF5E0gt9r1Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to testng...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/93cef56c-3bbd-4de3-8b93-04a6b0910467%40googlegroups.com.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/BD6001AB-157C-47A7-8F1C-48B600BF689D%40gmail.com.
--
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...@googlegroups.com.
@Test(dataProvider = "ScreenFlowsFromExcel",dependsOnMethods = { "DatasetFromExcel" }, invocationCount=10 )
public void ScreenFlowsFromExcel(String testFlowExecution, ArrayList<LocatorModel> testStepsToExecute) throws Exception {....
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/c0cd6132-a347-40cb-91b4-f3e3a5378079%40googlegroups.com.