From 43eb35bb6b1712d96e5dba658af5989abe0060c8 Mon Sep 17 00:00:00 2001 From: AliakseiLiasnitski Date: Thu, 21 Mar 2024 12:18:18 +0300 Subject: [PATCH] EPMRPP-89718 || Display stack trace for failed test cases in ReportPortal --- lib/reporter.js | 2 +- lib/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reporter.js b/lib/reporter.js index 7e8f37e..1e08d3a 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -146,7 +146,7 @@ class Reporter { sendLogOnFinishFailedItem(test, tempTestId) { if (test.status === FAILED) { const sendFailedLogPromise = this.client.sendLog(tempTestId, { - message: test.err, + message: test.err.stack, level: logLevels.ERROR, time: new Date().valueOf(), }).promise; diff --git a/lib/utils.js b/lib/utils.js index 4a181ac..0f43015 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -137,7 +137,7 @@ const getTestInfo = (test, testFileName, status, err) => ({ title: test.title, codeRef: getCodeRef(test.titlePath(), testFileName), parentId: test.parent.id, - err: (err && err.message) || err || (test.err && test.err.message), + err: err || test.err, testFileName, });