Search in sources :

Example 1 with FinishTestItemRQ

use of com.epam.ta.reportportal.ws.model.FinishTestItemRQ in project agent-java-soapui by reportportal.

the class StepBasedSoapUIServiceImpl method finishTestCase.

public void finishTestCase(TestCaseRunner testCaseContext, PropertyExpansionContext propertyContext) {
    if (null != launch) {
        FinishTestItemRQ rq = new FinishTestItemRQ();
        rq.setEndTime(Calendar.getInstance().getTime());
        rq.setStatus(TestStatus.fromSoapUI(testCaseContext.getStatus()));
        this.launch.finishTestItem(fromStringId(testCaseContext.getTestCase().getPropertyValue(ID)), rq);
    }
}
Also used : FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ)

Example 2 with FinishTestItemRQ

use of com.epam.ta.reportportal.ws.model.FinishTestItemRQ in project agent-java-soapui by reportportal.

the class StepBasedSoapUIServiceImpl method finishTestSuite.

public void finishTestSuite(TestSuiteRunner testSuiteContext) {
    if (null != launch) {
        FinishTestItemRQ rq = new FinishTestItemRQ();
        rq.setEndTime(Calendar.getInstance().getTime());
        rq.setStatus(TestStatus.fromSoapUI(testSuiteContext.getStatus()));
        if (testSuiteContext.getStatus().equals(Status.FAILED)) {
            context.setLaunchFailed(true);
        }
        this.launch.finishTestItem(fromStringId(testSuiteContext.getTestSuite().getPropertyValue(ID)), rq);
    }
}
Also used : FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ)

Example 3 with FinishTestItemRQ

use of com.epam.ta.reportportal.ws.model.FinishTestItemRQ in project agent-java-soapui by reportportal.

the class StepBasedSoapUIServiceImpl method finishTestStep.

public void finishTestStep(TestStepResult testStepContext, TestCaseRunContext paramTestCaseRunContext) {
    if (null != launch) {
        Maybe<String> testId = (Maybe<String>) paramTestCaseRunContext.getProperty(ID);
        String logStepData = getLogStepData(testStepContext);
        if (!Strings.isNullOrEmpty(logStepData)) {
            ReportPortal.emitLog(logStepData, "INFO", Calendar.getInstance().getTime());
        }
        for (final SaveLogRQ rq : getStepLogReport(testStepContext)) {
            ReportPortal.emitLog(new Function<String, SaveLogRQ>() {

                @Override
                public SaveLogRQ apply(String id) {
                    rq.setTestItemId(id);
                    return rq;
                }
            });
        }
        if (TestStepStatus.FAILED.equals(testStepContext.getStatus())) {
            ReportPortal.emitLog(getStepError(testStepContext), "ERROR", Calendar.getInstance().getTime());
        }
        FinishTestItemRQ rq = new FinishTestItemRQ();
        rq.setEndTime(Calendar.getInstance().getTime());
        if (TestStepStatus.CANCELED.equals(testStepContext.getStatus())) {
            context.setTestCanceled(true);
        }
        rq.setStatus(TestStatus.fromSoapUIStep(testStepContext.getStatus()));
        this.launch.finishTestItem(testId, rq);
    }
}
Also used : Maybe(io.reactivex.Maybe) SaveLogRQ(com.epam.ta.reportportal.ws.model.log.SaveLogRQ) FinishTestItemRQ(com.epam.ta.reportportal.ws.model.FinishTestItemRQ)

Aggregations

FinishTestItemRQ (com.epam.ta.reportportal.ws.model.FinishTestItemRQ)3 SaveLogRQ (com.epam.ta.reportportal.ws.model.log.SaveLogRQ)1 Maybe (io.reactivex.Maybe)1