1.1 --- a/rt/vmtest/pom.xml Thu Feb 28 21:14:11 2013 +0100
1.2 +++ b/rt/vmtest/pom.xml Thu Feb 28 21:35:55 2013 +0100
1.3 @@ -24,6 +24,13 @@
1.4 <target>1.7</target>
1.5 </configuration>
1.6 </plugin>
1.7 + <plugin>
1.8 + <groupId>org.apache.maven.plugins</groupId>
1.9 + <artifactId>maven-javadoc-plugin</artifactId>
1.10 + <configuration>
1.11 + <excludePackageNames>org.apidesign.bck2brwsr.vmtest.impl</excludePackageNames>
1.12 + </configuration>
1.13 + </plugin>
1.14 </plugins>
1.15 </build>
1.16 <properties>
2.1 --- a/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java Thu Feb 28 21:14:11 2013 +0100
2.2 +++ b/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/Http.java Thu Feb 28 21:35:55 2013 +0100
2.3 @@ -23,8 +23,7 @@
2.4 import java.lang.annotation.Target;
2.5
2.6 /**
2.7 - * Exposes HTTP page or pages to the running {@link BrwsrTest}, so it can access under
2.8 - * the relative path.
2.9 + * Exposes an {@link Resource HTTP page} or a set of {@link #value() pages} to the running {@link BrwsrTest}.
2.10 *
2.11 * @author Jaroslav Tulach <jtulach@netbeans.org>
2.12 */
2.13 @@ -34,8 +33,10 @@
2.14 /** Set of pages to make available */
2.15 public Resource[] value();
2.16
2.17 - /** Exposes an HTTP page to the running {@link BrwsrTest}, so it can access
2.18 - * under the relative path.
2.19 + /** Describes single HTTP page to the running {@link BrwsrTest}, so it can be
2.20 + * accessed under the specified {@link #path() relative path}. The page
2.21 + * content can either be specified inline via {@link #content()} or as
2.22 + * an external {@link #resource() resource}.
2.23 *
2.24 * @author Jaroslav Tulach <jtulach@netbeans.org>
2.25 */
2.26 @@ -44,7 +45,7 @@
2.27 public @interface Resource {
2.28 /** path on the server that the test can use to access the exposed resource */
2.29 String path();
2.30 - /** the content of the HttpResource */
2.31 + /** the content of the <code>Http.Resource</code> */
2.32 String content();
2.33 /** resource relative to the class that should be used instead of <code>content</code>.
2.34 * Leave content equal to empty string.
3.1 --- a/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Feb 28 21:14:11 2013 +0100
3.2 +++ b/rt/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Feb 28 21:35:55 2013 +0100
3.3 @@ -17,22 +17,35 @@
3.4 */
3.5 package org.apidesign.bck2brwsr.vmtest;
3.6
3.7 +import org.apidesign.bck2brwsr.launcher.Launcher;
3.8 import org.apidesign.bck2brwsr.vmtest.impl.CompareCase;
3.9 import org.testng.annotations.Factory;
3.10
3.11 -/** A TestNG {@link Factory} that seeks for {@link Compare} annotations
3.12 - * in provided class and builds set of tests that compare the computations
3.13 - * in real as well as JavaScript virtual machines. Use as:<pre>
3.14 +/** A TestNG {@link Factory} that seeks for {@link Compare} and {@link BrwsrTest} annotations
3.15 + * in provided class and builds set of tests that verify the functionality of <b>Bck2Brwsr</b>
3.16 + * based system. Use as:
3.17 + * <pre>
3.18 * {@code @}{@link Factory} public static create() {
3.19 - * return @{link VMTest}.{@link #create(YourClass.class);
3.20 + * return @{link VMTest}.{@link #create(java.lang.Class) create}(YourClass.class);
3.21 * }</pre>
3.22 - *
3.23 + * where <code>YourClass</code> contains methods annotated with
3.24 + * {@link Compare} and {@link BrwsrTest} annotations.
3.25 + *
3.26 * @author Jaroslav Tulach <jtulach@netbeans.org>
3.27 */
3.28 public final class VMTest {
3.29 - /** Inspects <code>clazz</code> and for each {@lik Compare} method creates
3.30 - * instances of tests. Each instance runs the test in different virtual
3.31 + private VMTest() {
3.32 + }
3.33 +
3.34 + /** Inspects <code>clazz</code> and for each method annotated by
3.35 + * {@link Compare} or {@link BrwsrTest} creates
3.36 + * instances of tests.
3.37 + * <p>
3.38 + * Each {@link Compare} instance runs the test in different virtual
3.39 * machine and at the end they compare the results.
3.40 + * <p>
3.41 + * Each {@link BrwsrTest} annotated method is executed once in {@link Launcher started
3.42 + * browser}.
3.43 *
3.44 * @param clazz the class to inspect
3.45 * @return the set of created tests