It did not work. Here are my two test cases and the data which is used by the two test cases. The first test case is running for the two rows of data and the second test case is only run for the first row of data. All I need is once the first test case creates a new request with one row of data, I want the second test case to be kicked off and once it is finished, I want the first test case to create a new request using the second row of data . Please advise?
[b:18rmd8ot]Test Case #1:[/b:18rmd8ot]
@Test(dataProvider="getTestData")
public void reqForm(String User, String projName, String projStartDate, String portfolio, String reqType,
String fiscalyear, String projEndDate, String sponsor)
{
Reporter.log("ABC - ABC Request Form Testcase");
// test the runmode of current dataset
count++;
if(!runmodes[count].equalsIgnoreCase("Y")){
skip=true;
throw new SkipException("Runmode for test set data set to NO "+count);
}
ABCRequestForm e = new ABCRequestForm();
e.requestForm( User, projName, projStartDate, portfolio, reqType, fiscalyear, projEndDate, sponsor);
}
[b:18rmd8ot]Here is the data from the excel spreadsheet:[/b:18rmd8ot]
User projName projStartDate portfolio reqType fiscalyear projEndDate sponsor Runmode
John Selenium1 6/1/2016 Treasury Dept New Investment 2016 7/1/2016 Ajay Y
Abby Selenium2 7/1/2016 Revenue Dept New Investment 2016 8/1/2016 Ajay Y
[b:18rmd8ot]Test Case # 2[/b:18rmd8ot]
public void BizSponsorApproval(String sponsor)
{
Reporter.log("EBC Business Sponsor Approval Testcase");
// test the runmode of current dataset
count++;
if(!runmodes[count].equalsIgnoreCase("Y")){
skip=true;
throw new SkipException("Runmode for test set data set to no "+count);
}
EBCSponsorApproval s = new EBCSponsorApproval();
s.approvalForm(sponsor);
}
[b:18rmd8ot]Test Data for test case #2[/b:18rmd8ot]
sponsor Runmode Results
Ajay Y PASS