use of io.irontest.core.testcase.DataDrivenTestcaseRunner in project irontest by zheng-wang.
the class TestcaseRunResource method create.
@POST
@Path("testcaseruns")
@PermitAll
@JsonView(ResourceJsonViews.TestcaseRunResultOnTestcaseEditView.class)
public TestcaseRun create(@QueryParam("testcaseId") long testcaseId) throws IOException {
Testcase testcase = testcaseDAO.findById_Complete(testcaseId);
TestcaseRunner testcaseRunner;
if (testcase.getDataTable().getRows().isEmpty()) {
testcaseRunner = new RegularTestcaseRunner(testcase, utilsDAO, testcaseRunDAO, wireMockServer);
} else {
testcaseRunner = new DataDrivenTestcaseRunner(testcase, utilsDAO, testcaseRunDAO, wireMockServer);
}
return testcaseRunner.run();
}
Aggregations