When IntelliJ runs a TestSuite, its report preserves the nested TestSuite structure. For example,
is generated by the following:
package tests3p0;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class Suite1 extends TestCase {
public static TestSuite suite() {
TestSuite suite = new TestSuite();
suite.addTest(new Test1());
suite.addTest(new Test2());
suite.addTestSuite(SubSuite.class);
return suite;
}
}
class Test1 extends TestCase {
public Test1() {
super("test1");
}
@Override
protected void runTest() throws Throwable {
System.out.println("test1");
}
}
class Test2 extends TestCase {
public Test2() {
super("test2");
}
@Override
protected void runTest() throws Throwable {
System.out.println("test2");
}
}
package tests3p0;
import junit.framework.TestCase;
public class SubSuite extends TestCase {
public SubSuite() {
}
public void testMe() {
System.out.println("tested");
}
}
The equivalent HTML report produced by gradle squashes test1, test2, and testMe into a single level under Suite1.
Is there a way to preserve the nested structure in the generated HTML report?