Edgewall Software
Modify

Opened 16 years ago

Last modified 12 years ago

#263 new enhancement

[PATCH] Support the CUnit xml format

Reported by: jeberger@… Owned by: osimons
Priority: major Milestone: 0.6.1
Component: Build slave Version: 0.5.3
Keywords: Cc: jeberger@…
Operating System:

Description

Add support for the CUnit xml format (http://cunit.sourceforge.net/)

Attachments (5)

bitten-cunit.patch (4.5 KB) - added by jeberger@… 16 years ago.
Patch against trunk revision 519
CUnit-CountTestInsteadOfAssertFailures.patch (1.6 KB) - added by Jérôme M. Berger <jeberger@…> 15 years ago.
Fix invalid failure count
cunit-tests.tar.gz (2.1 KB) - added by J. Berger <jeberger@…> 14 years ago.
Example of CUnit output and corresponding source
bitten-cunit-traceback.patch (3.1 KB) - added by J. Berger <jeberger@…> 14 years ago.
Adds "traceback" information.
bitten-cunit-ignored.patch (1.7 KB) - added by J. Berger <jeberger@…> 12 years ago.
Patch to keep track of the ignored tests.

Download all attachments as: .zip

Change History (11)

Changed 16 years ago by jeberger@…

Patch against trunk revision 519

Changed 15 years ago by Jérôme M. Berger <jeberger@…>

Fix invalid failure count

comment:1 Changed 15 years ago by Jérôme M. Berger <jeberger@…>

The first patch counted failed assertions instead of failed tests. Since there is no way to count successful assertions anyway, I've attached a new patch to keep track of which tests were already seen in a failure report and only count failed tests once.

The new patch must be applied after the first one.

comment:2 Changed 15 years ago by osimons

  • Owner changed from cmlenz to osimons

Looks useful. The second patch is a patch on top of the first?

I'd really like a unittest case to go with the patch that shows the format and how it is parsed, and would need to update the command-reference docs too.

I don't have a development setup for this, but I see Cunit in macports so installing it should likely not be an issue. Could you help me out with a build script to create output + parse it based for instance on the Cunit example file: http://cunit.sourceforge.net/example.html

Then I can actually test the parsing, and perhaps also help write unittest for the command.

comment:3 Changed 15 years ago by osimons

  • Milestone changed from 0.6 to 0.6.1

Changed 14 years ago by J. Berger <jeberger@…>

Example of CUnit output and corresponding source

comment:4 Changed 14 years ago by J. Berger <jeberger@…>

Replying to osimons:

Looks useful. The second patch is a patch on top of the first?

I'd really like a unittest case to go with the patch that shows the format and how it is parsed, and would need to update the command-reference docs too.

I don't have a development setup for this, but I see Cunit in macports so installing it should likely not be an issue. Could you help me out with a build script to create output + parse it based for instance on the Cunit example file: http://cunit.sourceforge.net/example.html

Then I can actually test the parsing, and perhaps also help write unittest for the command.

Sorry I missed that one. Yes, the second patch is on top of the first, and the third is on top of the second ;) I'm attaching a simple example source with some successes and some failures and the corresponding .xml file.

Changed 14 years ago by J. Berger <jeberger@…>

Adds "traceback" information.

comment:5 Changed 14 years ago by J. Berger <jeberger@…>

I've added a third patch on top of the second. This patch adds "traceback" information to the report so that it can be visible inline in the "Test Results" table (in fact, only the file:line and information about the failed assertions are included, not a full traceback).

comment:6 Changed 12 years ago by J. Berger <jeberger@…>

  • Cc jeberger@… added

When I wrote those patches, CUnit did not support ignoring tests. Now it does, but it only reports the total number of ignored tests that were skipped during processing (and not even all of them). According to Documentation/reports.html, Bitten requires a list of the ignored tests. I have submitted a patch to CUnit (number 3511444) to keep track of the ignored tests.

Here is a patch that uses this information to report the number of ignored tests in Bitten. This patch goes on top of the previous three patches.

Changed 12 years ago by J. Berger <jeberger@…>

Patch to keep track of the ignored tests.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain osimons.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.