Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test result viewer sometimes displays results in incorrect nested location #467

Open
disordered opened this issue Mar 26, 2024 · 3 comments

Comments

@disordered
Copy link

I sometimes get test results to show in incorrect location in the tree. I think it only affects test results that are failing.

Tests are structured like so:

object MySpec extends ZIOSpecDefault {
  override def spec: Spec[TestEnvironment & Scope, Any] =
    suiteAll("Outer") {
      suiteAll("Inner") {
        test("Test") {...}
        test("Test2") {...}
        // I usually get random tests from elsewhere to show under the dynamic group
        // For example, Test2 might once in a while popup under dynamic collection
        suite("Dynamic test collection"){
          List(condition1, condition2).map(cond => test("test for $cond"){...})
        }
      }
    }
}

I'm on ZIO 2 and Scala 3.
SBT has testFrameworks += TestFrameworks.ZIOTest.
Test parallelism is enabled.
Test reporter is configured to show "Passed", "Ignored" and sort by "Suites always on top".

@hmemcpy
Copy link
Collaborator

hmemcpy commented Apr 3, 2024

Thanks for reporting! Sorry for just now getting to this...
You mention test parallelism enabled, how exactly? Did you set something in sbt?

I'll try to reproduce and see if I can fix this... Thanks again!

@disordered
Copy link
Author

sorry a bit confusing wording, I did not disable it, ZIO 2 runs tests in parallel by default.
I also did not disable parallel tests in SBT, but I doubt this is related, since it is happening when executing test suite inside IntelliJ.

@hmemcpy
Copy link
Collaborator

hmemcpy commented Apr 3, 2024

Ah cool. Yeah, the default test runner in ZIO runs up to 4 tests in parallel, but that should affect the output... I'll investigate it either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants