Modified: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-debug.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-debug.xml?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-debug.xml 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-debug.xml 
Fri Dec  2 04:29:34 2005
@@ -1,10 +1,10 @@
           <config
-             host="localhost"
-             port="8080"
-             protocol="http"
-             basepath="struts-mailreader"
-             summary="true"
-             saveresponse="true"
-             resultpath="results"
-             resultfile="result.txt"
-             showhtmlparseroutput="true"/>
+                  host="${host}"
+                  port="${port}"
+                  basepath="${basepath}"
+                  protocol="http"
+                  summary="true"
+                  saveresponse="true"
+                  resultpath="results"
+                  resultfile="result.txt"
+                  showhtmlparseroutput="true" />

Modified: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-tidy.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-tidy.xml?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-tidy.xml 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config-tidy.xml 
Fri Dec  2 04:29:34 2005
@@ -1,10 +1,10 @@
           <config
-             host="localhost"
-             port="8080"
-             protocol="http"
-             basepath="example"
-             summary="false"
-             saveresponse="false"
-             resultpath="results"
-             resultfile="result.txt"
-             showhtmlparseroutput="true"/>
+                  host="${host}"
+                  port="${port}"
+                  basepath="${basepath}"
+                  protocol="http"
+                  summary="false"
+                  saveresponse="false"
+                  resultpath="results"
+                  resultfile="result.txt"
+                  showhtmlparseroutput="true" />

Modified: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config.xml?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config.xml 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/config.xml Fri Dec 
 2 04:29:34 2005
@@ -1,6 +1,6 @@
           <config
-             host="localhost"
-             port="8080"
-             protocol="http"
-             basepath="example" />
+                  host="${host}"
+                  port="${port}"
+                  basepath="${basepath}"
+                  protocol="http" />
 

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-fail.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-fail.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-fail.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-fail.xml Fri 
Dec  2 04:29:34 2005
@@ -0,0 +1,4 @@
+<clickButton
+    description="Submit"
+    name="Submit"/>
+&logon-page;
\ No newline at end of file

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-open.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-open.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-open.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-open.xml Fri 
Dec  2 04:29:34 2005
@@ -0,0 +1,4 @@
+<invoke
+   description="Pass logon"
+   url="Logon.do" />
+&logon-page;
\ No newline at end of file

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-page.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-page.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-page.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/logon-page.xml Fri 
Dec  2 04:29:34 2005
@@ -0,0 +1,3 @@
+<verifyTitle
+    description="Logon page title"
+    text="${logon.title}" />

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/menu-page.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/menu-page.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/menu-page.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/menu-page.xml Fri 
Dec  2 04:29:34 2005
@@ -0,0 +1,3 @@
+<verifytitle
+    description="Menu page title"
+    text="${mainMenu.title}" />

Added: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-hermes.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-hermes.xml?rev=351699&view=auto
==============================================================================
--- 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-hermes.xml 
(added)
+++ 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-hermes.xml 
Fri Dec  2 04:29:34 2005
@@ -0,0 +1,23 @@
+<setInputField
+  description="username"
+  name="username"
+  value="hermes" />
+<setInputField
+  description="password"
+  name="password"
+  value="m3dus4"  />
+<setInputField
+  description="password2"
+  name="password2"
+  value="m3dus4"  />
+<setInputField
+  description="fullName"
+  name="fullName"
+  value="Hermes Katsopolis"  />
+<setInputField
+  description="fromAddress"
+  name="fromAddress"
+  value="[EMAIL PROTECTED]"  />
+<clickButton
+    description="Save"
+    name="${button.save}"/>

Added: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-open.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-open.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-open.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-open.xml 
Fri Dec  2 04:29:34 2005
@@ -0,0 +1,5 @@
+&welcome-open;
+<clickLink
+        description="Click Register"
+        label="${index.registration}" />
+&register-page;

Added: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-page.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-page.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-page.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/register-page.xml 
Fri Dec  2 04:29:34 2005
@@ -0,0 +1,3 @@
+<verifyTitle
+    description="Registration page title"
+    text="${registration.title.create}" />

Modified: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-click.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-click.xml?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-click.xml 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-click.xml 
Fri Dec  2 04:29:34 2005
@@ -1,6 +1,6 @@
-<clicklink
+<clickLink
         description="Click Welcome"
         label="${index.title}" />
-<verifytitle
+<verifyTitle
     description="Welcome page title"
     text="${index.title}" />

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-open.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-open.xml?rev=351699&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-open.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/welcome-open.xml 
Fri Dec  2 04:29:34 2005
@@ -0,0 +1,6 @@
+<invoke
+   description="Open welcome action"
+   url="Welcome.do" />
+<verifyTitle
+    description="Welcome page title"
+    text="${index.title}" />

Modified: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample 
Fri Dec  2 04:29:34 2005
@@ -8,4 +8,8 @@
 #
 # $Id$
 # -----------------------------------------------------------------------------
-webtest.home = /opt/Canoo/webtest-1.7
\ No newline at end of file
+webtest.home = /opt/Canoo/webtest-1.7
+host = localhost
+port = 8080
+basepath = struts-mailreader
+resource.home = 
../../java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties
\ No newline at end of file

Modified: struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml?rev=351699&r1=351698&r2=351699&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml (original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml Fri Dec  2 
04:29:34 2005
@@ -1,8 +1,16 @@
 <?xml version="1.0"?>
-   <!DOCTYPE project SYSTEM "entities/WebTest.dtd" [
-    <!ENTITY config SYSTEM "entities/config-debug.xml">
-    <!ENTITY taskdef-webtest SYSTEM "entities/taskdef.xml">
-    <!ENTITY welcome-click SYSTEM "file:./entities/welcome-click.xml">
+<!DOCTYPE project SYSTEM "entities/WebTest.dtd" [
+        <!ENTITY taskdef-webtest SYSTEM "entities/taskdef.xml">
+        <!ENTITY config SYSTEM "entities/config-debug.xml">
+        <!ENTITY logon-fail SYSTEM "file:./entities/logon-fail.xml">
+        <!ENTITY logon-open SYSTEM "file:./entities/logon-open.xml">
+        <!ENTITY logon-page SYSTEM "file:./entities/logon-page.xml">
+        <!ENTITY menu-page SYSTEM "file:./entities/menu-page.xml">
+        <!ENTITY register-hermes SYSTEM "file:./entities/register-hermes.xml">
+        <!ENTITY register-open SYSTEM "file:./entities/register-open.xml">
+        <!ENTITY register-page SYSTEM "file:./entities/register-page.xml">
+        <!ENTITY welcome-click SYSTEM "file:./entities/welcome-click.xml">
+        <!ENTITY welcome-open SYSTEM "file:./entities/welcome-open.xml">
 ]>
 <!--
  $Header: /home/cvs/jakarta-struts/web/example/WEB-INF/webtest.xml,v 1.2 
2004/03/12 02:44:34 husted Exp $
@@ -23,21 +31,33 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<project name="MailReader Storyboard - Exercise navigation and database logic 
- Canoo WebTests" basedir="." default="default">
+<project name="MailReader Storyboard - Exercise navigation and database logic
+- Canoo WebTests" basedir="." default="default">
     <!--
-     Canoo WebTest configuration file to test navigating between pages and 
creating and editing an account.
+     Canoo WebTest configuration file to test navigating between pages and
+     creating and editing an account.
 
-     To run this test, first install the Canoo Webtest package on your local 
system ().
+     To run this test, first install the Canoo Webtest package on your
+     local system [http://webtest.canoo.com].
 
-     The default location is under "/opt/Canoo/build_379". See the 
webtest.properties.sample to use another location. 
-
-     Once Canoo is installed, the webtest.xml file can be run as an Ant build 
file.
-
-     The tests are written for a container running at port 8080 using the 
Struts "/target" directory as the 
-     web root. 
-
-     Use the standard Struts "build.webapps" target to create the example 
application. Start your web container. 
-     Then use Ant to run the webtest.xml.
+     The default location for this build file is under
+     "/opt/Canoo/webtest-1.7".
+     See the webtest.properties.sample to use another location.
+
+     Once Canoo is installed, the webtest.xml file can be run as an Ant build
+     file (ant -f webtest.xml).
+
+     By default, the tests are configured to find the application under test
+      at "http://localhost:8080/struts-mailreader";.
+     See the webtest.properties.sample to use another location.
+
+     Use the standard Struts Apps "maven build-all" goal to create the
+     MailReader war, deploy it to your container, and use Ant to run the
+     webtest.xml.
+
+     The tests are based on a set of MailReader Use Cases maintained at the
+     Struts University site
+     
[http://opensource2.atlassian.com/confluence/oss/display/STRUTS/MailReader].
      
      @version $Revision: 1.2 $ $Date$
      */
@@ -49,103 +69,185 @@
     <property name="webtest.home"
         location="/opt/Canoo/webtest-1.7" />
 
+    <property name="host"
+        value="localhost" />
+
+    <property name="port"
+        value="8080" />
+
+    <property name="basepath"
+        value="struts-mailreader" />
+
+    <property name="resource.home"
+        
location="../../java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties"
 />
+
     <!-- Load application resources -->
-    <property 
file="../../java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties"/>
+    <property file="${resource.home}"/>
 
-    <taskdef file="C:\opt\Canoo\webtest-1.7\webtestTaskdefs.properties">
+    <taskdef file="${webtest.home}/webtestTaskdefs.properties">
        <classpath>
           <fileset dir="${webtest.home}" includes="**/lib/*.jar"/>
           <fileset dir="${webtest.home}" includes="**/lib/runtime/*.jar"/>
        </classpath>
     </taskdef>
 
-    <target name="default" depends="welcome,logon" />
+    <target name="default" depends="Browse,Logon" />
+
+    <!-- FIXME: target name="clean" depends="Browse,Register,Logon" / -->
 
-    <target name="welcome"
-        description="Welcome page">
+    <target name="Browse"
+            description=" Visitors can browse the Welcome, Login, and Register
+            pages (only) without presenting credentials.">
 
-        <webtest name="Open welcome action">
+        <webtest name="Browse public pages">
         &config;
            <steps>
-               <invoke
-                  description="Open welcome action"
-                  url="Welcome.do" />
-               <verifytitle
-                   description="Welcome page title"
-                   text="${index.title}" />
-               <clicklink
-                       description="Click Register"
-                       label="${index.registration}" />
-               <verifytitle
-                   description="Registration page title"
-                   text="${registration.title.create}" />
-
+               &register-open;
                &welcome-click;
-
-               <clicklink
+               <clickLink
                        description="Click Logon"
                        label="${index.logon}" />
-               <verifytitle
-                   description="Logon page title"
-                   text="${logon.title}" />
-
+               &logon-page;
                &welcome-click;
+           </steps>
+        </webtest>
 
+        <webtest name="Browse non-public pages (and fail)">
+        &config;
+           <steps>
+               <invoke
+                   description="Skip Logon page"
+                   url="SubmitLogon.do">
+               </invoke>
+               &logon-page;
+               <!-- This throws an Error 500.
+                    We might want to goto Logon instead.
+               <invoke
+                   description="Skip Save Registration page"
+                   url="SaveRegistration.do"/>
+                &logon-page;
+                -->
            </steps>
         </webtest>
     </target>
 
-    <target name="logon"
-        description="Logon page">
+    <target name="Register"
+            description = "Subscribers can store login credentials and a
+            primary email contact with the system.">
 
-        <webtest name="Open logon action">
+        <webtest name="Register Hermes">
         &config;
            <steps>
-               <invoke
-                  description="Pass logon"
-                  url="Logon.do" />
-               <verifytitle
-                   description="Logon page title"
-                   text="${logon.title}" />
-               <setinputfield
+               &register-open;
+               &register-hermes;
+               <verifyTitle
+                   description="Menu page title"
+                   text="${mainMenu.title}" />
+           </steps>
+        </webtest>
+
+        <webtest name="Register Hermes (again)">
+        &config;
+           <steps>
+               &register-open;
+               <setInputField
                  description="username"
                  name="username"
-                 value="user" />
-              <setinputfield
+                 value="hermes" />
+              <setInputField
                 description="password"
+                name="m3dus4"  />
+               <setInputField
+                 description="password"
+                 name="m3dus4"  />
+               <setInputField
+                 description="password"
+                 name="Hermes Katsopolis"  />
+               <setInputField
+                 description="password"
+                 name="[EMAIL PROTECTED]"  />
+               <clickButton
+                   description="Submit"
+                   name="Submit"/>
+               &register-page;
+           </steps>
+        </webtest>
+
+    </target>
+
+    <target name="Logon"
+        description="Subscribers can present their registration credentials to
+        use an account again.">
+
+        <webtest name="Open logon action">
+        &config;
+           <steps>
+               &logon-open;
+               <setInputField
+                 description="Default username"
+                 name="username"
+                 value="user" />
+              <setInputField
+                description="Correct default password"
                 name="password"
                 value="pass" />
-               <clickbutton
+               <clickButton
                    description="Submit"
                    name="Submit"/>
+               &menu-page;
             </steps>
         </webtest>
 
-        <webtest name="Fail logon">
+        <webtest name="Open logon action">
         &config;
            <steps>
-               <invoke
-                  description="Open logon action"
-                  url="Logon.do" />
-               <verifytitle
-                   description="Logon page title"
-                   text="${logon.title}" />
-               <setinputfield
-                 description="username"
+               &logon-open;
+               <setInputField
+                 description="Registered username"
                  name="username"
-                 value="xxxx" />
-              <setinputfield
-                description="password"
+                 value="hermes" />
+              <setInputField
+                description="Correct password"
                 name="password"
-                value="xxxx" />
-               <clickbutton
+                value="m3dus4" />
+               <clickButton
                    description="Submit"
                    name="Submit"/>
-               <verifytitle
-                   description="Logon page title"
-                   text="${logon.title}" />
+               <!-- FIXME: &menu-page;  -->
+            </steps>
+        </webtest>
+
+        <webtest name="Logon - Wrong password">
+        &config;
+           <steps>
+               &logon-open;
+               <setInputField
+                 description="Registered username"
+                 name="username"
+                 value="hermes" />
+              <setInputField
+                description="Wrong password"
+                name="password"
+                value="medusa" />
+               &logon-fail;
             </steps>
         </webtest>
     </target>
+
+        <webtest name="Logon - No Account">
+        &config;
+           <steps>
+               &logon-open;
+               <setInputField
+                 description="Not a username"
+                 name="username"
+                 value="zeus" />
+              <setInputField
+                description="Not a password"
+                name="password"
+                value="joltBolt" />
+               &logon-fail;
+            </steps>
+        </webtest>
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to