use of org.cerberus.crud.factory.IFactoryTestCaseStepActionExecution in project cerberus-source by cerberustesting.
the class RunManualTest method getTestCaseStepActionExecution.
private List<TestCaseStepActionExecution> getTestCaseStepActionExecution(HttpServletRequest request, ApplicationContext appContext, String test, String testCase, long executionId, int stepSort) {
List<TestCaseStepActionExecution> result = new ArrayList();
IRecorderService recorderService = appContext.getBean(IRecorderService.class);
long now = new Date().getTime();
IFactoryTestCaseStepActionExecution testCaseStepActionExecutionFactory = appContext.getBean(IFactoryTestCaseStepActionExecution.class);
// IRecorderService recorderService = appContext.getBean(IRecorderService.class);
String[] stepAction_increment = getParameterValuesIfExists(request, "action_increment_" + stepSort);
if (stepAction_increment != null) {
for (String inc : stepAction_increment) {
int step = Integer.valueOf(getParameterIfExists(request, "action_technical_step_" + stepSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "action_technical_step_" + stepSort + "_" + inc));
int sequence = Integer.valueOf(getParameterIfExists(request, "action_technical_sequence_" + stepSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "action_technical_sequence_" + stepSort + "_" + inc));
int sort = Integer.valueOf(getParameterIfExists(request, "action_sequence_" + stepSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "action_sequence_" + stepSort + "_" + inc));
String actionReturnCode = getParameterIfExists(request, "actionStatus_" + stepSort + "_" + inc);
String actionReturnMessage = getParameterIfExists(request, "actionResultMessage_" + stepSort + "_" + inc);
result.add(testCaseStepActionExecutionFactory.create(executionId, test, testCase, step, 1, sequence, sort, actionReturnCode, actionReturnMessage, "", "", "", "", "", "Manual Action", "", "", "", "", "", now, now, now, now, null, "", null, null));
}
}
return result;
}
Aggregations