Date: 2005-01-28T15:43:59
Editor: ZacharySmith
Wiki: Apache Beehive Wiki
Page: Controls/TestingControls/Milton
URL: http://wiki.apache.org/beehive/Controls/TestingControls/Milton
no comment
Change Log:
------------------------------------------------------------------------------
@@ -177,13 +177,12 @@
@Status("active")
public void testInstantiation() throws Exception
{
-
assertReport("controlsWeb/milton/pageflows/instantiate/InstantiationDriver/testInstantiation.do");
+
assertReport("/controlsWeb/milton/pageflows/instantiate/InstantiationDriver/testInstantiation.do");
}
}
}}}
-The above example is a JPF accessor.
-[[BR]]
+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. It is higly encouraged that you use TCH as it helps to organize the
test base. For more information on TCH please see the [wiki:/TCH TCH]
documentation. [[BR]]
{{{
import org.apache.beehive.test.tools.milton.junit.SOAPReportTestCase;
@@ -202,5 +201,8 @@
}
}
}}}
+
+The above example is a JWS accessor. [[BR]]
+
In both examples, the test method (`WebMethod` and `Action`) names are all the
same. This helps trace which methods are associated with each other. This
convention is not required but is definitly incouraged. When using Client
Generation you will get tests generated which look very similar to the above
examples (JPF, JPF, JUnit Accessors).