Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thanks to Stuart Lange's answer above, I was able to get Boost.Test's output to integrate with our Bamboo build system. Bamboo describes the format they can ingest here:</p> <p><a href="http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo" rel="noreferrer">http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo</a></p> <p>So I used Stuart Lange's XSL above as a starting point, and ended up with this:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"&gt; &lt;xsl:output method="xml" indent="yes"/&gt; &lt;xsl:template match="TestResult"&gt; &lt;xsl:call-template name="testSuite" /&gt; &lt;/xsl:template&gt; &lt;xsl:template name="testSuite"&gt; &lt;xsl:for-each select="TestSuite"&gt; &lt;testsuite&gt; &lt;xsl:attribute name="errors"&gt; &lt;xsl:value-of select="@test_cases_failed + @test_cases_aborted"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="tests"&gt; &lt;xsl:value-of select="@test_cases_passed + @test_cases_failed + @test_cases_skipped + @test_cases_aborted"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="skipped"&gt; &lt;xsl:value-of select="@test_cases_skipped"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="failures"&gt; &lt;xsl:value-of select="@test_cases_failed"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:call-template name="testAttributes" /&gt; &lt;!--results--&gt; &lt;xsl:call-template name="testSuite" /&gt; &lt;xsl:for-each select="TestCase"&gt; &lt;testcase&gt; &lt;xsl:call-template name="testAttributes" /&gt; &lt;xsl:call-template name="testCaseElements" /&gt; &lt;/testcase&gt; &lt;/xsl:for-each&gt; &lt;!--/results--&gt; &lt;/testsuite&gt; &lt;/xsl:for-each&gt; &lt;/xsl:template&gt; &lt;xsl:template name="testAttributes"&gt; &lt;xsl:attribute name="name"&gt; &lt;xsl:value-of select="@name"/&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="success"&gt; &lt;xsl:choose&gt; &lt;xsl:when test="@result = 'passed'"&gt;True&lt;/xsl:when&gt; &lt;xsl:when test="@result != 'passed'"&gt;False&lt;/xsl:when&gt; &lt;/xsl:choose&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="executed"&gt;True&lt;/xsl:attribute&gt; &lt;xsl:attribute name="time"&gt;0&lt;/xsl:attribute&gt; &lt;xsl:attribute name="asserts"&gt; &lt;xsl:value-of select="@assertions_failed + @assertions_passed"/&gt; &lt;/xsl:attribute&gt; &lt;/xsl:template&gt; &lt;xsl:template name="testCaseElements"&gt; &lt;xsl:if test="@result != 'passed'"&gt; &lt;failure type="No type reported" message="No message reported"/&gt; &lt;/xsl:if&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>We use the following command line options when we call our Boost.Test executable:</p> <pre><code>--report_format=xml --report_level=detailed </code></pre> <p>It's not the hottest XSL to leave the presses, but it's enough to see the suites, the tests contained, and which ones (if any) failed from Bamboo.</p> <p>One additional note, with this method you only want to capture the stderr output. The contents of stdout (at least the way we use Boost.Test) will break things.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload