Improve test_class documentation
@@ -83,9 +83,11 @@ public final class BazelJavaTestRule implements RuleDefinition {
</p>
<p>
This attribute specifies the name of a Java class to be run by
- this test. It is rare to need to set this. If this argument is omitted, the Java class
- whose name corresponds to the <code>name</code> of this
- <code>java_test</code> rule will be used.
+ this test. It is rare to need to set this. If this argument is omitted,
+ it will be inferred using the target's <code>name</code> and its
+ source-root-relative path. If the test is located outside a known
+ source root, Bazel will report an error if <code>test_class</code>
+ is unset.
</p>
<p>
For JUnit3, the test class needs to either be a subclass of
