Search in sources :

Example 1 with IFactoryTestCaseStepActionControlExecution

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;
}
Also used : IRecorderService(org.cerberus.engine.execution.IRecorderService) IFactoryTestCaseStepActionControlExecution(org.cerberus.crud.factory.IFactoryTestCaseStepActionControlExecution) ArrayList(java.util.ArrayList) IFactoryTestCaseStepActionControlExecution(org.cerberus.crud.factory.IFactoryTestCaseStepActionControlExecution) Date(java.util.Date)

Aggregations

ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 IFactoryTestCaseStepActionControlExecution (org.cerberus.crud.factory.IFactoryTestCaseStepActionControlExecution)1 IRecorderService (org.cerberus.engine.execution.IRecorderService)1