Date: 2005-01-31T11:30:49
Editor: ZacharySmith
Wiki: Apache Beehive Wiki
Page: Controls/TestingControls/Milton
URL: http://wiki.apache.org/beehive/Controls/TestingControls/Milton
no comment
Change Log:
------------------------------------------------------------------------------
@@ -161,8 +161,7 @@
If you have questions about the JWS syntax please refer to the [wiki:/WSM WSM]
documentation. This should look similar to the JPF example above with a few
minor changes. In this case there is a `WebMethod` called `testInstantiate()`
which can directly return a `Report` to the JUnit accessor. Also note that
when using Milton your `WebMethod` must take no parameters as the Milton test
clients have no mechanism to pass data to the JWS. In other words, your tests
must be self contained as much as possible so that they can easily be moved
from one client context to another.
[[BR]]
-'''JUnit Accessor Examples'''
-
+'''JUnit Accessor Examples:'''
{{{
import org.apache.beehive.test.tools.milton.junit.HtmlReportTestCase;
@@ -172,14 +171,12 @@
{
public TestInstantiation(String s){super(s);}
-
@Freq("checkin")
@Status("active")
public void testInstantiation() throws Exception
{
assertReport("/controlsWeb/milton/pageflows/instantiate/InstantiationDriver/testInstantiation.do");
}
-
}
}}}
JPF Accessors like the one above must extend `HtmlReportTestCase` to take
advantage of the `assertReport` methods. The String passed to `assertReport`
is the path relative to the root to the JPF which contains your test. (You can
put in a fully qualified URL here if you prefer but Milton can discover the
name of your host) Here we take advantage of the JPF 'actionName.do' syntax.
The annotations [EMAIL PROTECTED] and [EMAIL PROTECTED] are used for creating
TCH files. You are highly encouraged to use TCH as it helps to organize the
test base. For more information on TCH please see the [wiki:/TCH TCH]
documentation. [[BR]]