You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tdk-dev@turbine.apache.org by br...@apache.org on 2002/01/03 20:14:25 UTC
cvs commit: jakarta-turbine-tdk/xdocs/stylesheets project.xml
brekke 02/01/03 11:14:25
Modified: xdocs/stylesheets project.xml
Added: xdocs application-testing.xml
Log:
Beginning of a document containing tips and best practices with regards to
testing of applications implemented with Turbine. Hopefully others will also
add tips and techniques to this doc.
Revision Changes Path
1.1 jakarta-turbine-tdk/xdocs/application-testing.xml
Index: application-testing.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Application Testing</title>
<author email="brekke@apache.org">Jeffrey D. Brekke</author>
</properties>
<body>
<section name="Application Testing">
<p>
These samples are for testing your code which uses the Turbine framework.
We take care not to involve testing Turbine itself, but more how to
exercise your application code. If you are looking for unit tests of
the Turbine source code itself, this is the incorrect document. These
are testing techniques for applications implemented with Turbine.
The samples and techniques use various frameworks such as JUnit,
HttpUnit, and Cactus. A Reference section is provided with links
to more information about the frameworks and techniques used in the
sample code.
</p><p>
This document is very much a work in progress as the sample tests are
directly taken from our code we are currently developing. Hopefully
this document will serve not only as a reference for starting to test
your Turbine based applications, but a place to collect and document
testing techniques the Turbine application developer may use.
</p><p>
Extreme Programming breaks testing into two parts, Developer Tests, and
Customer Tests. This document contains tips for both kinds of tests.
Each one is slightly different so some explanation will be helpful.
This is a very short, high level description of the test types. More
detailed information may be found in the reference section.
</p><p>
Developer Tests are unit tests written by the developers
as the production code is written. Another practice of Extreme
Programming is Test-First Coding, where the test is written, fails, then
the code is written to make it pass. Developer Tests can be thought of as
white-box testing. Inspection of the state of the code in the unit under
test is important in this type of testing. All Developer Tests must be
running at 100%, no failures, at all times. JUnit is the framework
used for these tests described here.
</p><p>
Customer Tests are more like black-box tests. They test that the feature
( user story in XP-speak ) is functioning properly. This type of test
could also be thought of as end-to-end testing or system testing.
If your application has a feature to generate a pdf report, a Customer
Test may be: <i>Given inputs x and y, the pdf should look like z</i>. We've
generally used HttpUnit to simulate the user-agent accessing our web
applications and verify its output.
</p>
</section>
<section name="Developer Testing">
<UL>
<LI>
<b>Tip:</b> Start Turbine standalone without a servlet container to test torque objects, global pull tools, and other services.
</LI>
<LI>
<b>Tip:</b> Use mock objects for RunData and Context to test actions.
</LI>
<LI>
<b>Tip:</b> Use simple anonymous inner classes to mock your torque object for testing.
</LI>
</UL>
</section>
<section name="Customer Testing">
<UL>
<LI>
<b>Sample:</b> HttpUnit test case of a turbine application.
</LI>
</UL>
</section>
<section name="Reference">
<UL>
<li><a href="http://jakarta.apache.org/cactus">Cactus</a></li>
<li><a href="http://httpunit.sourceforge.net">HttpUnit</a></li>
<li><a href="http://www.junit.org">JUnit</a></li>
<li><a href="http://www.mockobjects.com">Mock Objects</a></li>
</UL>
</section>
</body>
</document>
1.3 +1 -0 jakarta-turbine-tdk/xdocs/stylesheets/project.xml
Index: project.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-tdk/xdocs/stylesheets/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.xml 27 Dec 2001 12:05:33 -0000 1.2
+++ project.xml 3 Jan 2002 19:14:25 -0000 1.3
@@ -9,6 +9,7 @@
<menu name="Essentials">
<item name="Overview" href="/index.html"/>
<item name="Tutorial" href="/tdk-howto.html"/>
+ <item name="Application Testing" href="/application-testing.html"/>
<item name="Building" href="/build.html"/>
<item name="Todo" href="/todo.html"/>
<item name="Changes" href="/changes.html"/>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>