Skip to content

Commit

Permalink
issue #467: only analyze error cause if test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bhecquet committed Jan 18, 2022
1 parent 10b3359 commit a455c3b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void findErrorCauses(Map<ITestContext, Set<ITestResult>> resultSet) {

// When SeleniumRobotTestRecorded has been run, results are stored on seleniumRobot server and it's then possible
// to compare reference snapshot with current failed step (if any)
if (TestNGResultUtils.isSeleniumServerReportCreated(testResult)) {
if (!testResult.isSuccess() && TestNGResultUtils.isSeleniumServerReportCreated(testResult) && testResult.getThrowable() != null && !(testResult.getThrowable() instanceof AssertionError)) {
List<ErrorCause> errorCauses = new ErrorCauseFinder(testResult).findErrorCause();
TestNGResultUtils.setErrorCauses(testResult, errorCauses);
}
Expand Down

0 comments on commit a455c3b

Please sign in to comment.