Reputation: 685
What's the difference between bazel test
vs bazel run
on the the java test rule? When I run the bazel run
command, my test passes just fine, while with bazel test
I get an error. If needed, I can provide more details, but I was interested in general differences between those two commands.
Upvotes: 14
Views: 11778
Reputation: 66
Bazel test launches the test in an isolated container. Due to this any default environment variable that were not explicitly set would not be available for test system. A typical example would be HELM_HOME being blank in bazel test.
Upvotes: 5
Reputation: 4610
You can run a single test target with bazel run
. bazel test
is highly parallel, has more options regarding tests and better reporting.
Upvotes: 1