use of org.cerberus.crud.factory.IFactoryTestCaseStepExecution in project cerberus-source by cerberustesting.
the class RunManualTest method getTestCaseStepExecution.
// </editor-fold>
private List<TestCaseStepExecution> getTestCaseStepExecution(HttpServletRequest request, ApplicationContext appContext, String test, String testCase, long executionId) {
List<TestCaseStepExecution> result = new ArrayList();
long now = new Date().getTime();
IFactoryTestCaseStepExecution testCaseStepExecutionFactory = appContext.getBean(IFactoryTestCaseStepExecution.class);
String[] testcase_step_increment = getParameterValuesIfExists(request, "step_increment");
if (testcase_step_increment != null) {
for (String inc : testcase_step_increment) {
int step = Integer.valueOf(getParameterIfExists(request, "step_technical_number_" + inc) == null ? "0" : getParameterIfExists(request, "step_technical_number_" + inc));
int sort = Integer.valueOf(getParameterIfExists(request, "step_number_" + inc) == null ? "0" : getParameterIfExists(request, "step_number_" + inc));
String stepResultMessage = getParameterIfExists(request, "stepResultMessage_" + inc);
String stepReturnCode = getParameterIfExists(request, "stepStatus_" + inc);
result.add(testCaseStepExecutionFactory.create(executionId, test, testCase, step, 1, sort, "", "", "", "", "", "", null, now, now, now, now, new BigDecimal("0"), stepReturnCode, stepResultMessage, ""));
}
}
return result;
}
Aggregations