Date: 2005-01-28T15:18:24
   Editor: ZacharySmith
   Wiki: Apache Beehive Wiki
   Page: Controls/TestingControls/Milton
   URL: http://wiki.apache.org/beehive/Controls/TestingControls/Milton

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -87,7 +87,7 @@
  * 2. The Client(s): You will need to write the JPF and JWS clients for your 
test.
  * 3. The JUnit Accessors: These are the simple JUnit files which invoke the 
tests on your clients.
 
-'''JPF Example:'''
+'''JPF Client Example:'''
 
 {{{
 import org.apache.beehive.netui.pageflow.PageFlowController;
@@ -120,8 +120,11 @@
     public Forward testInstantiation()
     {
        Report report = new Report()
-       InstantiationDriver id = new InstantiationDriver(); 
-       return new Forward(Report.RESULTS, Report.KEY, 
id.testInstantiation(icb));
+       InstantiationDriver id = new InstantiationDriver();
+       report = id.testInstantiation(icb); 
+       return new Forward(Report.RESULTS, Report.KEY, report);
     }
 }
 }}}
+
+If you have questions about the JPF syntax please set the NetUI documentation. 
 In the above example there are two 'Actions'.  The first is the `begin()` 
Action which is required on every JPF.  In this case the `begin()` Action does 
not contain a test and puts an Report with an ABORT status on the request.  
Because Milton must relies on the data found in the `Report` obejct to analyzet 
he results of a test this is accomplised with JPF but putting the `Report` on 
the request and giving it a known name, `Report.KEY` and 'Forwarding' the user 
to a known JSP, `Report.RESULTS`.  Using `Report.RESULTS` and `Report.KEY` is 
required for correct Milton operation because the `Report` must be forwarded to 
a JSP which converts the `Report` to an HTML table which can be parsed by the 
JUnit accessor.

Reply via email to