Separation of JUnit results by TestSuite

27 views
Skip to first unread message

christop...@googlemail.com

unread,
Aug 5, 2020, 2:38:26 AM8/5/20
to Jenkins Users
Hi,

I found a strange phenomenon in test result display of jenkins. I had two tests with very instable test results, good, bad, bad, good, good, good and every time I opened the display, the sequence was different. But when opening the tests I found out all of them either failed or passed.

What I found out:
I am compiling the same code as a static and a dynamic link library and I am calling the same Unit tests for both variants. Thus, the test names by class and name are identically but they are separated by the name of the testsuite.
To explain the problem above: tests for one of the variants failed while the other passed. That might lead to a race condition while displaying the test results.

Now I am wondering why Jenkins does not respect the testsuite while evaluation the test results.
The tools I am working with:
I am writing xunit-style test results as xml.
I am parsing these test results with xunit plugin using the tool JUnit.

Some of the tests also are implemented with GoogleTest but none of these is causing problems (or at least I am not aware).

Is there any idea out there for me how to progess here? Can I fix this by myself with selection of the tools or their parameters or is this an issue in jenkins or one of the plugins that loose or disregard the property 'testsuite' during evaluation?

May thank in advance!
BR,
Christoph

jeremy mordkoff

unread,
Aug 5, 2020, 12:37:56 PM8/5/20
to Jenkins Users
I believe this construct in the junit xml files can be safely modified to force jenkins to see the test results as two separate tests

<testcase classname= 

christop...@googlemail.com

unread,
Aug 6, 2020, 9:27:32 AM8/6/20
to Jenkins Users
You mean postprocessing the result files to fake different class names to workaround the laking separation of the testsuite by jenkins?

jeremy mordkoff

unread,
Aug 6, 2020, 9:29:48 AM8/6/20
to Jenkins Users
yes, exactly. I post process mine to remove the hostname from the class because my tooling generates the class based on the path. 
Reply all
Reply to author
Forward
0 new messages