jaroslav@1201: package ${package}; jaroslav@1201: jaroslav@1201: import org.apidesign.bck2brwsr.vmtest.BrwsrTest; jaroslav@1201: import org.apidesign.bck2brwsr.vmtest.HtmlFragment; jaroslav@1201: import org.apidesign.bck2brwsr.vmtest.VMTest; jaroslav@1201: import org.testng.annotations.Factory; jaroslav@1201: jaroslav@1201: /** Sometimes it is useful to run tests inside of the real browser. jaroslav@1201: * To do that just annotate your method with {@link org.apidesign.bck2brwsr.vmtest.BrwsrTest} jaroslav@1201: * and that is it. If your code references elements on the HTML page, jaroslav@1201: * you can pass in an {@link org.apidesign.bck2brwsr.vmtest.HtmlFragment} which jaroslav@1201: * will be made available on the page before your test starts. jaroslav@1201: */ jaroslav@1201: public class IntegrationTest { jaroslav@1201: jaroslav@1201: /** Write to testing code here. Use assert (but not TestNG's jaroslav@1201: * Assert, as TestNG is not compiled with target 1.6 yet). jaroslav@1201: */ jaroslav@1201: @HtmlFragment( jaroslav@1202: "

Put this snippet on the HTML page

\n" jaroslav@1201: ) jaroslav@1201: @BrwsrTest jaroslav@1202: public void runThisTestInABrowser() { jaroslav@1201: } jaroslav@1201: jaroslav@1201: @Factory jaroslav@1201: public static Object[] create() { jaroslav@1201: return VMTest.create(IntegrationTest.class); jaroslav@1201: } jaroslav@1201: jaroslav@1201: }