use of io.irontest.core.runner.TestcaseRunner in project irontest by zheng-wang.
the class TestcaseRunResource method create.
@POST
@Path("testcaseruns")
@PermitAll
public TestcaseRun create(@QueryParam("testcaseId") long testcaseId) throws JsonProcessingException {
Testcase testcase = testcaseDAO.findById_Complete(testcaseId);
List<UserDefinedProperty> testcaseUDPs = udpDAO.findByTestcaseId(testcaseId);
DataTable dataTable = utilsDAO.getTestcaseDataTable(testcaseId, false);
TestcaseRunner testcaseRunner;
if (dataTable.getRows().isEmpty()) {
testcaseRunner = new RegularTestcaseRunner(testcase, testcaseUDPs, teststepDAO, utilsDAO, testcaseRunDAO);
} else {
testcaseRunner = new DataDrivenTestcaseRunner(testcase, testcaseUDPs, dataTable, teststepDAO, utilsDAO, testcaseRunDAO);
}
return testcaseRunner.run();
}
Aggregations