From 5e2d457320e6f8dcb4c9c60ac7d96f135eb904a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gro=C3=9Fmann?= Date: Mon, 8 Mar 2021 17:23:22 +0100 Subject: [PATCH] Fixed stacktrace string at failed tests --- .../synchronize/AzureDevOpsResultSynchronizer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/tsystems/mms/tic/testerra/plugins/azuredevops/synchronize/AzureDevOpsResultSynchronizer.java b/src/main/java/eu/tsystems/mms/tic/testerra/plugins/azuredevops/synchronize/AzureDevOpsResultSynchronizer.java index 072faf8..f8955b5 100644 --- a/src/main/java/eu/tsystems/mms/tic/testerra/plugins/azuredevops/synchronize/AzureDevOpsResultSynchronizer.java +++ b/src/main/java/eu/tsystems/mms/tic/testerra/plugins/azuredevops/synchronize/AzureDevOpsResultSynchronizer.java @@ -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; @@ -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 resultList = new ArrayList<>();