Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Add getResult and getSuiteResult methods in CbTestReporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimer committed Jun 10, 2022
1 parent ba57805 commit 15086e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.cloudbeat</groupId>
<artifactId>cb-common</artifactId>
<version>0.12.4</version>
<version>0.12.5</version>
<build>
<plugins>
<plugin>
Expand Down
11 changes: 10 additions & 1 deletion src/main/java/io/cloudbeat/common/reporter/CbTestReporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public void setFramework(final String frameworkName, final String frameworkVersi
result.addAttribute("framework.version", frameworkVersion);
}
}
public SuiteResult getSuiteResult(final String fqn) {
return result.lastSuite(fqn).orElse(null);
}

public TestResult getResult() {
return result;
}

public void startInstance() {
// ignore this call if instance has been already initialized
Expand Down Expand Up @@ -135,6 +142,9 @@ public void startCase(final String name, final String fqn, final String suiteFqn
public void endCase(final String caseFqn) throws Exception {
endCase(caseFqn, null, null);
}
public void endCase(final String caseFqn, final Throwable throwable) throws Exception {
endCase(caseFqn, null, throwable);
}
public void endCase(final String caseFqn, final TestStatus status, final Throwable throwable) throws Exception {
if (lastCase == null || lastCase.getFqn() == null)
return;
Expand Down Expand Up @@ -309,7 +319,6 @@ public void logError(final String message, Throwable error) {
logMessage.setFailure(new FailureResult(error));
logMessage.setLevel(LogLevel.ERROR.value());
logMessage(logMessage);

}

/*
Expand Down

0 comments on commit 15086e2

Please sign in to comment.