[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extend the xUnit xml report

Currently we are using cmocka for unit testing our c-modules which are constructed as static libraries. All stuff related to the unit testing framework runs as expected but sometimes there are unit tests throwing an exception. These exceptions are caught through the cmocka exception handler also as expected. The cmocka exception handler prints some informational message to the internal message buffer cm_error_message using cm_print error(). After the tests ends cmocka could generate e.g. a xUnit xml test report adding also the entries from the message buffer. But exactly at this point cmocka does not have any possibility to extend these error message handling. We think adding a possibility to the cmocka API to extend the error messages could be helpful, especially in the cases cmocka runs in a CI system like Jenkins.
For some discussion we suggest this ideas to extend the cmocka API:

·         Add a test group exception handler with the purpose to get access to the exception signal e.g. to report some additional information like a stacktrace.

·         Make the cm_print_error function available in the cmocka API to add some messages to the XML output.
Any other comments or suggestion to extend the xUnit xml report ?
Best regards

Mit freundlichen Grüßen / Kind regards

i.A. Ulrich Götz

Entwicklung Embedded Systems / Development Embedded Systems

Jetter AG
Gräterstraße 2
-71642 Ludwigsburg
Tel.: +49-7141-2550-0
Fax: +49-7141-2550-425

Ust.-Id.: DE 812 643 615
Amtsgericht Stuttgart HRB 205545
Vorstandsvorsitzender: Christian Benz
Vorsitzender des Aufsichtsrates: Martin Jetter

VAT Reg.-No.: DE 812 643 615
Registered: Stuttgart HRB 205545
CEO: Christian Benz
Chairman of the Supervisory Board: Martin Jetter

Besuchen Sie uns | Visit us | FachPack 2016 | Hall 3, stand 634


Attachment: messehinweis_e-mail_signatur_533px_fachpack_160711.jpg
Description: messehinweis_e-mail_signatur_533px_fachpack_160711.jpg