Search in sources :

Example 1 with IFactoryTestCaseStepExecution

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;
}
Also used : IFactoryTestCaseStepExecution(org.cerberus.crud.factory.IFactoryTestCaseStepExecution) IFactoryTestCaseStepExecution(org.cerberus.crud.factory.IFactoryTestCaseStepExecution) ArrayList(java.util.ArrayList) Date(java.util.Date) BigDecimal(java.math.BigDecimal)

Aggregations

BigDecimal (java.math.BigDecimal)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 IFactoryTestCaseStepExecution (org.cerberus.crud.factory.IFactoryTestCaseStepExecution)1