Tuscany End User Sample Testing
Initial Setup
Most of the following only needs to be done once
unless noted otherwise.
- Follow the steps to build Tuscany DAS Companyweb sample application from Tuscany DAS Java Overview.
- Change directory
to java/das/samples/testing/tomcat.
- Download
Tomcat Core 5.5.xx zip
for Windows or tar.gz for Linux from Apache
Tomcat.
- You can place the tomcat distribution in your java/samples/das/testing/tomcat directory or, alternatively, you can create/edit {user home}/build.properties to
change the property tuscany.acceptance.tomcat.zipped to tell the build
environment where the tomcat distribution zip file is located.
- You may have to edit build.xml to change the property tuscany.acceptance.tomcat.version
to match the xx
to the specific version that you downloaded.
Running
In
the java/das/samples/testing/tomcat
directory run maven:
mvn
Explanation
Maven does
the following:
- Unpacks the
Tomcat distribution into the target directory to ensure a pristine
environment.
- It adds the appropriate Tuscany and it
dependencies jars into Tomcat (for more details)
- Does
the necessary changes
to Tomcat's configuration as required. (for more details)
- Deploys
Tuscany's DAS sample war files into Tomcat.
- Starts
Tomcat (You should see another window running Tomcat)
- Begins
running HTML unit tests that should closely match running the samples
as a user would.
If all goes well at the end you
should see:
[INFO] ----------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ----------------------------------------------------------------------------
[INFO] Tuscany Testing in Tomcat .............................. SUCCESS [0.340s]
[INFO] Tuscany Testing Tomcat DAS Sample - Companyweb ......... SUCCESS [48.350s]
[INFO] ----------------------------------------------------------------------------
[INFO] ----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 49 seconds
[INFO] Finished at: Tue Aug 08 15:30:28 EDT 2006
[INFO] Final Memory: 7M/15M
[INFO] ----------------------------------------------------------------------------
Cleanup
Close
the Tomcat window and issue mvn clean
.Note
Because the html unit tests execute multiple user actions that change the contents of the database tables, is recommended
that you always run these tests in a clean environment (after a mvn clean),
otherwise you may experience failure on some tests as the expected result data might have been affected by previous test runs.