Show Multiple Stacktrace in Jenkins

I was wondering how to put a error message or stacktrace from JUnit report to Jenkins? I had a test result and I transform it using XSL to JUnit format. If the test is failed, there are some error message that show the reason why the test is failed, but according to this page we can only add one liine of message error and multiple stacktrace. I was wondering how can I add multiple stacktrace?

The result of my test script (XML):

<SummaryResultsFile testName="test1">
    <Validation Result>
        <result>FAILED</result>
        <nrOfError>2</nrOfError>
        <validationMessage>
            <message>Additional attribute is present in command set</message>
            <message>Group (0000) attribute not allowed as Additional attribute</message>
        </validationMessage>
</SummaryResultsFile>

My XSLT for the temmplate:

...
<testcase classname ="{$testName}" name = "{$testName}">
    <xsl:for-each select="/SummaryResultsFile/ValidationResults/ValidationMessage/Message">
        <error><xsl:value-of select="Message"/></error>
    </xsl:for-each> 
</testcase>
...

After the transformation with XSLT:

<testsuites>
  <testsuite>
   ...     
   <testcase classname="test1"name="test1">
             <error>Additional attribute is present in command set</error>
             <error>Group (0000) attribute not allowed as Additional attribute</error>
    </testcase>
   ...
  </testsuite>
</testsuites>

If I see from the the Jenkins, the first <error> tag is only show in the stacktrace (see picture below), but others <error> tag I couldn’t get in the Jenkins. Is there anyway to show multiple stacktrace?

Stacktrace

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s