intellij icon indicating copy to clipboard operation
intellij copied to clipboard

classpath error when running unit test with intellij

Open kariyum opened this issue 7 months ago • 1 comments

Description of the bug:

Pressing on the run button to the run the test suite or a single unit test would result in a classpath error Unable to load a Suite class. This could be due to an error in your runpath. Running the test suit with the bazel command using --test_filter option works as expected.

Which category does this issue belong to?

Intellij

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Besides that it's happening in my project, I have cloned this open source project and faced the same issue when trying to run unit tests.

Which Intellij IDE are you using? Please provide the specific version.

IntelliJ IDEA 2025.1.1.1 (Ultimate Edition) Build #IU-251.25410.129, built on May 9, 2025

What programming languages and tools are you using? Please provide specific versions.

Scala

What Bazel plugin version are you using?

Bazel (EAP) 2025.1.9-nightly.325+d61eb554a

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

kariyum avatar May 29 '25 11:05 kariyum

The open source project you have referred still uses Bazel 5.1.1, which isn't supported by our plugin anymore. Can you provide a reproducible example with Bazel 6.5.0 or newer?

P.S. After bumping .bazelversion to 6.5.0 and correcting two linter errors, I was able to import the project and run the tests without any issues.

odisseus avatar Jun 12 '25 14:06 odisseus