This is how I'm using the java_test_suite:
(https://github.com/bazel-contrib/rules_jvm#java_test_suite)
java_test_suite(
name = "everything-tests",
srcs = glob(["src/test/java/**/*.java"]),
runner = "junit5",
test_suffixes = ["Tests.java"],
runtime_deps = JUNIT5_DEPS,
deps = [
":everything",
...
] + deps,
)
However, what it is doing is that java_test_suite is iterating over each srcs and creating a java_test for it. The problem becomes when one of my tests has a dependency on another test class.
For example, I have a test class which extends another abstract test class like so:
public class CustomTimerTests extends BaseTimerTests
But CustomTimerTests is failing as it is not able to find BaseTimerTests because java_test_suite does not let me add BaseTimerTests as one of the sources for CustomTimerTests.
Anyone knows how to fix it?