junit-plugin icon indicating copy to clipboard operation
junit-plugin copied to clipboard

Removing Stacktrace Trim

Open lucasborin opened this issue 3 years ago • 2 comments

Jenkins and plugins versions report

Jenkins 2.332.1 junit plugin - 1119.va_a_5e9068da_d7

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 20.* (Docker)

Reproduction steps

In a declarative pipeline: junit testResults: '**/findings.xml'

For the giving findings.xml:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="abaplint" tests="1" failures="1" errors="0" skipped="0">
    <testcase classname="" file="./example.clas.abap" name="./example.clas.abap: [756, 9] - colon_missing_space">
      <failure message="Missing space after the colon" type="Error"><![CDATA[  755 |  METHOD GET_PRICING_APP_TEXT_SINGLE.
  756 |    DATA:lt_dd07v TYPE TABLE OF dd07v.
      |        ^
  757 |    DATA:lv_langu TYPE sy-langu.]]></failure>
    </testcase>
  </testsuite>
</testsuites>

Expected Results

No trim in the Stacktrace, like:

Error
Missing space after the colon

Stacktrace
  755 |  METHOD GET_PRICING_APP_TEXT_SINGLE.
  756 |    DATA:lt_dd07v TYPE TABLE OF dd07v.
      |        ^
  757 |    DATA:lv_langu TYPE sy-langu.

Actual Results

GitHub Pull Request - Checks: image

JaaS - Blue Ocean (Tests): image

JaaS - Classical (JUnit Test Result) [OK already]: image

Anything else?

No response

lucasborin avatar Jun 17 '22 18:06 lucasborin

Not sure if I quite get this, you say https://user-images.githubusercontent.com/5233413/174359582-1b1b2d92-ee71-4601-aa76-641ce0d873b3.png is okay but it looks the same to me.

timja avatar Jun 17 '22 21:06 timja

In the Stack Trace, please check the alignment of lines 755 and 756:

image

The source file is the same, but depending on the display it trims the initial spaces in the first line.

lucasborin avatar Jun 20 '22 12:06 lucasborin