Skip to content

Commit

Permalink
Fixed stacktrace string at failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martingrossmann committed Mar 8, 2021
1 parent 01836a7 commit 5e2d457
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import eu.tsystems.mms.tic.testframework.report.FailureCorridor;
import eu.tsystems.mms.tic.testframework.report.model.context.ErrorContext;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;

import java.lang.reflect.Method;
import java.time.Instant;
Expand Down Expand Up @@ -148,7 +149,8 @@ private synchronized void syncTestresult(MethodEndEvent event, Outcome outcome)
final String errorMessage = StringUtils.isNotEmpty(errorContext.getDescription()) ? errorContext.getDescription() : errorContext.getThrowable().getMessage();
result.setErrorMessage(errorMessage);
result.setFailureType(this.getFailureType(event).toString());
result.setStackTrace(event.getMethodContext().getErrorContext().getThrowable().getStackTrace().toString());
final String stackTrace = ExceptionUtils.getStackTrace(event.getMethodContext().getErrorContext().getThrowable());
result.setStackTrace(stackTrace);
}

List<Result> resultList = new ArrayList<>();
Expand Down

0 comments on commit 5e2d457

Please sign in to comment.