use of org.cerberus.crud.factory.IFactoryTestCaseStepActionControlExecution in project cerberus-source by cerberustesting.
the class RunManualTest method getTestCaseStepActionControlExecution.
private List<TestCaseStepActionControlExecution> getTestCaseStepActionControlExecution(HttpServletRequest request, ApplicationContext appContext, String test, String testCase, long executionId, int stepSort, int actionSort) {
List<TestCaseStepActionControlExecution> result = new ArrayList();
IRecorderService recorderService = appContext.getBean(IRecorderService.class);
long now = new Date().getTime();
IFactoryTestCaseStepActionControlExecution testCaseStepActionExecutionFactory = appContext.getBean(IFactoryTestCaseStepActionControlExecution.class);
// IRecorderService recorderService = appContext.getBean(IRecorderService.class);
String[] stepActionControl_increment = getParameterValuesIfExists(request, "control_increment_" + stepSort + "_" + actionSort);
if (stepActionControl_increment != null) {
for (String inc : stepActionControl_increment) {
int step = Integer.valueOf(getParameterIfExists(request, "control_technical_step_" + stepSort + "_" + actionSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "control_technical_step_" + stepSort + "_" + actionSort + "_" + inc));
int sequence = Integer.valueOf(getParameterIfExists(request, "control_technical_sequence_" + stepSort + "_" + actionSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "control_technical_sequence_" + stepSort + "_" + actionSort + "_" + inc));
int control = Integer.valueOf(getParameterIfExists(request, "control_technical_control_" + stepSort + "_" + actionSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "control_technical_control_" + stepSort + "_" + actionSort + "_" + inc));
int sort = Integer.valueOf(getParameterIfExists(request, "control_control_" + stepSort + "_" + actionSort + "_" + inc) == null ? "0" : getParameterIfExists(request, "control_control_" + stepSort + "_" + actionSort + "_" + inc));
String controlReturnCode = getParameterIfExists(request, "controlStatus_" + stepSort + "_" + actionSort + "_" + inc);
String controlReturnMessage = getParameterIfExists(request, "controlResultMessage_" + stepSort + "_" + actionSort + "_" + inc);
result.add(testCaseStepActionExecutionFactory.create(executionId, test, testCase, step, 1, sequence, control, sort, controlReturnCode, controlReturnMessage, "", "", "", "", "", "Manual Control", null, null, null, null, null, now, now, now, now, "", null, null));
}
}
return result;
}
Aggregations