Unit test report with project dependency not showing all tests

Not sure what category to put this in and it may be more of a gradle issue.

We have a KMM project that also has an additional KMM module that is called testSupport and has classes to support testing. So we add a dependency on that module in the main KMM module’s commonTest sourceSet:

sourceSets {
     getByName("commonTest").dependencies {
        implementation(project(":testSupport"))

The issue I have is with the HTML unit test report generated for the main module. The testSupport module also has some tests for its classes. The HTML generated report generates the HTML report for all classes and packages with tests, BUT the main index.html file that is generated only shows the tests from the testSupport module.

I know the project function supports passing a configuration name and I have tried to find a way to just depend only on the commonMain classes of testSupport but can’t find a configuration name that applies.

Not sure what else to try but it is a pain in the butt when you get a failure and you cannot just open the main index.html file

2 Likes

So I went back to look at it and the issue is not with the generated report which is fine. The issue is with IntelliJ/Android Studio when you say Open in Browser on the index.html file. It is opening the other file not the one clicked on.