[fpc-devel] jUnit output for fpcunit

Joost van der Sluis joost at cnoc.nl
Wed Dec 29 16:22:30 CET 2021

Op 29-12-2021 om 16:05 schreef Michael Van Canneyt via fpc-devel:
> On Wed, 29 Dec 2021, Joost van der Sluis via fpc-devel wrote:
>> I'm trying to run my fpcunit unit-tests on Gitlab, and let Gitlab show 
>> the results. But it can only handle JUnit-like xml.
>> Does someone already have something lying around to convert the 
>> fpcunit format into junit?
> Is the FPCUnit format very different from the JUnit one ? Because 
> fpcunit is based on junit.

Well, they are similar, but not similar enough.


<?xml version="1.0" encoding="utf-8"?>
   <!-- Generated using FPCUnit on 2021-12-29 15:02:32-->
     <TestSuite Name="" ElapsedTime="00:00:16.471" NumberOfErrors="0" 
NumberOfFailures="6" NumberOfRunTests="29" NumberOfIgnoredTests="0">
       <TestSuite Name="TDABTestRunBasics" ElapsedTime="00:00:03.598" 
NumberOfErrors="0" NumberOfFailures="2" NumberOfRunTests="10" 
         <Test Name="TestInitialize" Result="OK" 
   <Title>FPCUnit Console test runner</Title>
   <DateTimeRan>2021-12-29 15:02:48</DateTimeRan>


<testsuite tests="3">
     <testcase classname="foo1" name="ASuccessfulTest"/>
     <testcase classname="foo2" name="AnotherSuccessfulTest"/>
     <testcase classname="foo3" name="AFailingTest">
         <failure type="NotEnoughFoo"> details about failure </failure>

If nothing exists already, I can add it as a format to fpcunit.



More information about the fpc-devel mailing list