Testsuite names are not displayed in JUnit Test Summaries
Summary
Testsuite names are not shown in JUnit Test Summaries.
JUnit produces the following kind of XML for each separate Java test class:
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="xxx.di.ConstructorTest" tests="4" skipped="0" failures="0" errors="0" timestamp="2018-08-24T14:19:10" hostname="xxxx" time="0.008">
<properties/>
<testcase name="classWithNoInjectConstructor()" classname="xxx.di.ConstructorTest" time="0.001"/>
<testcase name="classWithInjectConstructor()" classname="xxx.di.ConstructorTest" time="0.001"/>
<testcase name="classWithDefaultConstructor()" classname="xxx.di.ConstructorTest" time="0.0"/>
<testcase name="classWithMultipleInjectConstructors()" classname="xxx.di.ConstructorTest" time="0.0"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
In a project with a lot of test classes, this leads to many testsuite elements. However, the JUnit Test Summaries in the MR widget only display the testcase's name attribute, and also in the popup dialog the testsuite's name is nowhere to be found. This can make it quite hard to find the test that is broken.
Moreover, when using JUnit Jupiter, the testsuite name can be different from the class name (display name feature), so using the classname of the testcase would only partly solve the problem.
Steps to reproduce
- Have a Java project with JUnit
- Configure JUnit Test Summaries
Example Project
MR islandsvinur/gitlab-ce-50666!1 displays the problem.
What is the current bug behavior?
The testsuite's name is not visible anywhere in the interface.
What is the expected correct behavior?
The testsuite's name is visible somewhere in the interface, possibly only in the popup dialog.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)