DUnitX and Finalbuilder (is there a special action for dUnitX?)

Hello,

I’m using Delphi XE and Finalbuilder 8. We would like to run some dUnitX testcases but have problems reading the number of read testcases (total, succes, failed, error etc). Finalbuilder however does not pickup the counters with the execute dunit. Is there another action in Finalbuilder available reading those counters?

In the delphi testcases we are using a TDUnitXConsoleLogger, TDUnitXXMLNUnitFileLogger and a TDUnitXHtmlFileLogger.
I think i’m overlooking something simple, but what?

Thanks in advance,
Marius

Hi Marius,

Great to hear your using DUnitX, would be interested to know how you finding it as a Testing Framework?

With regards to DUnitX and FinalBuilder you can simply run the executable and it can produce (using the TDUnitXXMLNUnitFileLogger) a NUnit valid xml output file for import into your favourite tool.

If your looking to have FinalBuilder react to a unit test failure count, or other unit test counter value you could use the XML path actions to extract the specific values your after.

Another option might be to use Continua CI and FinalBuilder 8 together. Continua CI can digest the NUnit logs for you directly, and reports them in the webpage for the project in question. The following post goes a little more detail:

https://www.finalbuilder.com/resources/blogs/postid/699/integrating-dunitx-unit-testing-with-continua-ci

Thanks Jason,

We are already using TDUnitxXmlNUnitFileLogger. However Finalbuilder 8 is refusing to read the amount of testcases (total, failed etc.). After some searching and testing it looks like FB is having problems with the generated NUnit XML. As soon as the failure (see below) is present FB is reporting 0 testcases. Is this is bug or is there something wrong with the generated xml?

[code]<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><test-results name="C:\Delphi\Sources\Lms4.1\Test\Lms4.3\UniDac\FireBird\TestSuites.exe" total="2" errors="0" failures="1" ignored="0" inconclusive="0" not-run="0" skipped="0" invalid="0" date="2016-10-18" time="18.331"> <culture-info current-culture="en" current-uiculture="en" /> <test-suite type="Assembly" name="TestSuites.exe" executed="true" result="Failure" success="False" time="18.331" asserts="0"> <results> <test-suite type="Namespace" name="Mapper" executed="true" result="Failure" success="False" time="18.331" asserts="0" > <results> <test-suite type="Fixture" name="TTestMapperDocumentParser" executed="True" result="Failure" success="False" time="18.331" > <results> <test-case name="DocumentZeroBarcodes" executed="True" result="Success" success="True" time="7.084" asserts="0" /> <test-case name="DocumentDropBox" executed="True" result="Failure" success="False" time="11.009" asserts="0" >[b] <failure> <message> <![CDATA[ Expected 0 equals actual 0 Aantal events via droppath ]]> </message> <stack-trace> <![CDATA[ ]]> </stack-trace> </failure>[/b] </test-case> </results> </test-suite> </results> </test-suite> </results> </test-suite></test-results>[/code]

Regards,
Marius

For the record, the latest FB800.1937 has the same issue.

And additional, we are using the latest dunitx git sources from:
https://github.com/VSoftTechnologies/DUnitX.git

I (finally) see my error… In Finalbuilder I can use the define xml doc and read xml value + xpath to discover those values. I was under the impression FB would do that automaticly (thats what you get when you define a dunit testcase and expect dunit values read into the mentioned variables).

Would be a nice feature though

Hi Marius,

To clarify your looking for the ability to read in the NUnit xml file (produced by DUnitX) so you can use the values inside the FinalBuilder script. Is that correct? If so, we can look at the implementation of a NUnit xml import action.

Hello Jason,

That is correct. Native support of de nunit would be great (just like the dunit solution).
But using the parse xml option solved my problem, so not really a big deal.

Thanks,
Marius