use of com.epam.reportportal.listeners.ItemStatus in project agent-java-testNG by reportportal.
the class TestNGService method finishTestMethod.
@Override
@Deprecated
public void finishTestMethod(String statusStr, ITestResult testResult) {
ItemStatus status = ItemStatus.valueOf(statusStr);
finishTestMethod(status, testResult);
}
use of com.epam.reportportal.listeners.ItemStatus in project agent-java-testNG by reportportal.
the class TestNGService method getSuiteStatus.
/**
* Extension point to customize test suite status being sent to ReportPortal
*
* @param suite TestNG's suite
* @return Status PASSED/FAILED/etc
*/
protected String getSuiteStatus(ISuite suite) {
Collection<ISuiteResult> suiteResults = suite.getResults().values();
ItemStatus suiteStatus = ItemStatus.PASSED;
for (ISuiteResult suiteResult : suiteResults) {
if (!(isTestPassed(suiteResult.getTestContext()))) {
suiteStatus = ItemStatus.FAILED;
break;
}
}
// if at least one suite failed launch should be failed
isLaunchFailed.compareAndSet(false, suiteStatus == ItemStatus.FAILED);
return suiteStatus.name();
}
Aggregations