blob: 4f347687b8d0ea38b0f81fb2f0e06126781ffeea [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "entities/WebTest.dtd" [
<!ENTITY taskdef-webtest SYSTEM "entities/taskdef.xml">
<!ENTITY config SYSTEM "entities/config.xml">
<!ENTITY register-open SYSTEM "file:./entities/register-open.xml">
<!ENTITY register-page SYSTEM "file:./entities/register-page.xml">
<!ENTITY register-trillian SYSTEM "file:./entities/register-trillian.xml">
<!ENTITY save-click SYSTEM "file:./entities/save-click.xml">
<!ENTITY welcome-open SYSTEM "file:./entities/welcome-open.xml">
]>
<project name="MailReader Training Course - Exercise navigation and database logic
- Canoo WebTests" basedir="." default="clean">
<!--
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 [http://webtest.canoo.com].
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/lib-2-2".
See the webtest.properties.sample to use another location.
Deploy the application to your container, and use Ant to run the
webtest.xml.
The "clean" target can be run to test everything, but will fail if run again,
since the test-user will already be registered.
The "default" target skips registeration and can be run as often as needed
after "clean" is run once.
To reset the XML "database", either redeploy the application so that the
WEB-INF/classes/database.xml is overwritten,
or use the "clean-database" target to overwrite the file.
Only use "clean-database" when the server is stopped,
and then start it again before running other targets.
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].
*/
-->
<!-- Load local preferences, if any -->
<property file="webtest.properties"/>
<!-- These properties can be customized using via webtest.properties -->
<!-- See webtest.properties.sample for a starter file -->
<property name="webtest.home"
location="/opt/Canoo/webtest-1.7"/>
<property name="host"
value="localhost"/>
<property name="port"
value="8080"/>
<property name="basepath"
value="lab-2-2"/>
<property name="mailreader.home"
location="../../../"/>
<property name="webapps.home"
location="/opt/Apache/Tomcat-5.5/webapps"/>
<property file="${webapps.home}/${basepath}/WEB-INF/classes/resources.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="clean-database"
description="Sets database.xml to default. Stop server, run target, and Start server.">
<copy file="${mailreader.home}/src/java/database.xml"
tofile="${webapps.home}/${basepath}/WEB-INF/classes/database.xml"
overwrite="true"/>
</target>
<!-- ADD YOUR TARGETS HERE -->
<target name="clean" description="Only run against a clean database"
depends="Register"/>
<target name="Register"
description="Subscribers can store login credentials and a
primary email contact with the system.">
<webtest name="Register Trillian (MSS)">
&config;
<steps>
&register-open;
&register-trillian;
<verifyTitle
description="Menu page title"
text="MailReader - Menu"/>
</steps>
</webtest>
</target>
</project>