Edgewall Software

Changes between Version 4 and Version 5 of Boost Test


Ignore:
Timestamp:
Oct 24, 2007, 7:19:53 PM (17 years ago)
Author:
dabrahams
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Boost Test

    v4 v5  
    1313
    1414{{{
    15 run_tests --report_format=xml --report_level=detailed
     15run_tests --report_format=xXML --report_level=detailed
    1616}}}
    1717
     
    5757<build xmlns:sh="http://bitten.cmlenz.net/tools/sh" xmlns:x="http://bitten.cmlenz.net/tools/xml">
    5858  <step id="test" description="Test - run automated tests">
    59     <sh:exec executable="run_tests" output="test_results.xml" args="--log_level=nothing --report_format=xml --report_level=detailed" />
     59    <sh:exec executable="run_tests" output="test_results.xml" args="--log_level=nothing --report_format=XML --report_level=detailed" />
    6060    <x:transform src="test_results.xml" dest="test_report.xml" stylesheet="test_results.xslt" />
    6161    <report category="test" file="test_report.xml"/>
     
    6565
    6666Using this approach (using `<sh:exec>` to redirect the output to a file) your test log won't be very nice looking. You probably want to tweak this teample to generate the XML data by other means and instruct it to ouput nice log-message.
     67
     68  ''this didn't work for me.  The XSLT is not picking up the error information.  For example, the following Boost.Test XML output:''
     69
     70  {{{
     71#!xml
     72<TestLog>
     73  <TestSuite name="MyTest">
     74    <TestCase name="my_test">
     75      <Error file="tests.cpp" line="13">check add( 2,2 ) == 3 failed</Error>
     76      <Error file="tests.cpp" line="14">check add( 2,3 ) == 4 failed</Error>
     77      <Error file="tests.cpp" line="15">check add( 2,4 ) == 4 failed</Error>
     78      <Info file="tests.cpp" line="17">check add( 2,2 ) == 4 passed</Info>
     79      <Info file="tests.cpp" line="28">check &apos;add(..) result: 4&apos; passed</Info>
     80      <Info file="tests.cpp" line="30">check add( 2,2 ) == 4 passed</Info>
     81      <TestingTime>0</TestingTime>
     82    </TestCase>
     83  </TestSuite>
     84</TestLog>
     85  }}}
     86
     87  ''gets transformed into:''
     88
     89  {{{
     90#!xml
     91<?xml version="1.0"?>
     92<unit_tests>
     93  <test>
     94    <status/>
     95    <fixture>MyTest</fixture>
     96    <type>test</type>
     97    <name>my_test</name>
     98  </test>
     99</unit_tests>
     100  }}}
     101
     102  ''clearly something is missing'' -- dabrahams