samedi 11 juillet 2015

Looking for a suitable Unittest Xml output format for running on low resource bare metal targets

On a low resource bare metal target (Cortex-M3, build with gcc-arm), I need to run unittests with Jenkins CI.

For the unittest framework, I decide for unittest++ 1.4 (with some customizations).

For the first, this works with Jenkins as I installed xUnit plugin and usind unittest++’s XmlTestReporter. Unfortunately, unittest++’s XmlTestReporter is derived from DeferredTestReporter which itselfs requires an amount of heap space to temporarily store all test results before output (well this is required, because the xml output format specifies to report some summary (like the count of failed tests) within the root tag:

<?xml version="1.0"?>
<unittest-results tests="226" failedtests="1" failures="3" warnings="0" time="2221">
    <test suite="...
</unittest-results>

But on my Cortex-M3 target, I havn't enough heap to temporarily store all the test results. I need write out each test result without deferrance (like TestReporterStream or TestReporterStdout do).

So I think, I need to choose different xml output format and wrote my own xml output reporter (which runs without or with very low heap usage).

On my Jenkins xUnit plugin, I see the following supported formats:

  • AUnit-3.x
  • BoostTest-1.x
  • CTest-Version N/A
  • Check-Version N/A
  • CppTest-7.3
  • CppUnit-1.12.1
  • Custom Tool
  • EmbUnit-Version N/A
  • FPCUnit-2.0
  • GoogleTest-1.6
  • JUnit
  • MSTest-Version N/A
  • MbUnit-2.4
  • NUnit-Version N/A
  • PHPUnit-3.x
  • QTestlib-Version N/A
  • UnitTest-1.4
  • Valgrind-N/A
  • gtester/glib2-N/A
  • xUnit.Net-v2

I'd tried to take a look on some sample xml output of the above listet output formats to check if they fit to my needs. But I failed to find appropriate sample xml output.

Only for JUnit I'd find sample xml output here and it looks that it could be suitable (I just have the disadvantage, that I have to provide the required total number of tests in the suite tests attribute in the testsuite tag).

Now I want to checkout the other xml unittest result formats. Could someone help to find appropriate sample xml output for the above listet formats?

Aucun commentaire:

Enregistrer un commentaire