[Httpunit-commit] CVS: httpunit/sitedocs news.xml,NONE,1.1 site.xml,NONE,1.1 tutorial.html,NONE,1.1
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-05-18 05:20:51
|
Update of /cvsroot/httpunit/httpunit/sitedocs
In directory sc8-pr-cvs1:/tmp/cvs-serv25966/sitedocs
Added Files:
news.xml site.xml tutorial.html welcome.html
Log Message:
publish new website design
--- NEW FILE ---
<?xml version='1.0' ?>
<news>
<item date="16-May-2003">New web site format created</item>
<item date="2-May-2003" url='http://www.httpunit.org/prerelease/httpunit-1.5.4-d-05May.zip'>Added WebForm.getOptions() support for radio buttons and checkboxes</item>
<item date="4-Apr-2003">HttpUnit 1.5.3 released</item>
</news>
--- NEW FILE ---
<?xml version='1.0' ?>
<site project="HttpUnit" group-id="6550" logo="doc/images/HttpUnit.jpg">
<copyright owner="Russell Gold" dates="2000-2003"/>
<page location="index.html" title="Home" mainPage="true">
<fragment source="sitedocs/welcome.html"/>
<fragment source="sitedocs/news.xml" />
</page>
<page location="doc/license.html" title="License" license="true">
<fragment source="sitedocs/doc/license.html"/>
</page>
<external location="http://prdownloads.sourceforge.net/httpunit/httpunit-1.5.3.zip?download" item="Download 1.5.3"/>
<space/>
<page location="doc/cookbook.html" title="Cookbook">
<fragment source="sitedocs/doc/cookbook.html"/>
</page>
<page location="doc/tutorial/index.html" title="Tutorial">
<fragment source="sitedocs/tutorial.html"/>
</page>
<!-- <external location="doc/manual/index.html" item="User Manual"/> -->
<external location="doc/api/index.html" item="JavaDoc"/>
<page location="doc/faq.html" item="FAQ" title="Frequently Asked Questions">
<fragment source="sitedocs/doc/faq.xml"/>
</page>
<page location="doc/citations.html" title="Citations on the Web" item="External Citations">
<fragment source="sitedocs/doc/citations.xml" />
</page>
<page location="doc/javascript-support.html" item="JavaScript Support" title="JavaScript DOM Elements Supported">
<fragment source="sitedocs/doc/javascript-support.html" />
</page>
<page location="doc/servletunit-intro.html" item="ServletUnit Intro" title="ServletUnit Overview">
<fragment source="sitedocs/doc/servletunit-intro.html" />
</page>
<space/>
<page location="doc/developers.html" title="Developers">
<fragment source="sitedocs/doc/developers.xml" />
</page>
<project-page type="cvs" item="CVS Repository"/>
<external location="http://lists.sourceforge.net/lists/listinfo/httpunit-develop" item="Mailing List"/>
<space/>
<project-page type="bugs" item="Bug Database" />
<project-page type="enhancements" item="Feature Requests" />
</site>
--- NEW FILE ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>HttpUnit Tutorial - intro</title>
<LINK REL="stylesheet" HREF="tutorial.css" TYPE="text/css">
</head>
<body>
<p>This tutorial should help you to learn to use HttpUnit to develop and test your web sites. It will take you through the incremental
development of a simple servlet-based web application using a test-first approach. That is, first you are encouraged to
write and execute a test for the next piece of functionality to be added, verify that the test fails (demonstrating that
the functionality is not in place), and then implement the functionality and verify that the test now passes.</p>
<p>The initial tasks will use the <code>ServletRunner</code> class, thus bypassing the need for a web browser or servlet
engine. Later tasks will require a web browser and a servlet engine, and use <code>WebConversation</code>.</p>
<h2>The Application</h2>
<p>Our application is an office sport betting pool. An administrator is designated to manage the pool, which includes
opening and closing the betting. Entrants select the winner in each of the up to 10 games defined by the administrator
and also guess the total score in one of those games, as designated by the administrator. The winner of the pool is the
one who got the most winners correct, with any ties going to the person whose predicted total score in the tie-breaker game
was closest to the actual final score.</p>
<p>We will identify the following uses of the system:</p>
<p class="story-name">1.1 Administrator Opens Pool</p>
<p class="story-contents">The administrator defines up to ten games, specifying the home and away team for each game. He also selects one of
these games as the tie-breaker. Once the data is correct, the administrator opens the pool for betting.</p>
<p class="story-name">1.2 Administrator Closes Pool</p>
<p class="story-contents">After the pool is open, the administrator may at any time close the pool, thus preventing any
further bets or changes to existing bets.</p>
<p class="story-name">1.3 Administrator Posts Results</p>
<p class="story-contents">After the pool is closed, the administrator enters actual scores for each of the games played.
Once all scores have been entered, the administrator posts the results.</p>
<p class="story-name">2.1 Users enters a bet</p>
<p class="story-contents">After the pool is open, a user may sign on and create a bet, predicting the winner of each game
and the total score of the tie-breaker game. The user may change his bet until the pool is closed.</p>
<p class="story-name">2.2 User views results</p>
<p class="story-contents">Once the results have been posted, a user may examine his own bet to see how well he did. The
system will indicate the correct predictions and the user's rank in the pool.</p>
<p class="story-name">2.3 User views standings</p>
<p class="story-contents">Once the results have been posted, a user may view a list of all bidders ranked by number of
correct predictions.</p>
<p>This application is fairly simple, and hardly robust, but contains more than enough interactions to allow us to
explore development and testing with HttpUnit.
<h2>Tutorial Organization</h2>
<p>Each section of the tutorial will address a specific use of the system, and show how HttpUnit and ServletUnit can be used
to write tests which verify that functionality. You should begin each section by copying the initial directory, which includes
an ant build script and some classes that you will need to complete it. Running the ant script will compile the code and
run the tests. If you are not using ant, compile and run tutorial.TutorialTestSuite. After you implement each test,
it should fail until you then add the implementation.</p>
<p>Tasks</p>
<ul>
<li><a href="task1.html">Task 1: Create the pool editor</a>
<li><a href="task2.html">Task 2: Control access to the application</a>
</ul>
</body>
</html>
--- NEW FILE ---
<html>
<body>
<p>Automated testing is a great way to ensure that code being maintained works.
The <A HREF="http://www.XProgramming.com/">Extreme Programming</A> (XP) methodology relies heavily on it,
and practitioners have available to them a range of
<A HREF="http://www.xprogramming.com/software.htm">testing frameworks</A>,
most of which work by making direct calls to the code being tested.
But what if you want to test a web application?
Or what if you simply want to use a web-site as part of a distributed application?</p>
<p>In either case, you need to be able to bypass the browser and access your site from a program.
HttpUnit makes this easy. Written in Java,
HttpUnit emulates the relevant portions of browser behavior, including
form submission, <a href="doc/Javascript-support.html">JavaScript</a>,
basic <A HREF="ftp://ftp.isi.edu/in-notes/rfc2617.txt">http authentication</A>,
cookies and automatic page redirection, and allows
Java test code to examine returned pages either as text, an XML DOM, or containers of forms, tables, and links. When
combined with a framework such as <A HREF="http://www.junit.org">JUnit</a>, it is fairly easy to write tests that very
quickly verify the functioning of a web site.</p>
<p>The same techniques used to test web sites can be used to test and develop servlets without a servlet container
using <A HREF="doc/servletunit-intro.html">ServletUnit</A>, included in the download.</p>
<h2>Documentation</h2>
Several working example files come with the distribution download.
A rudimentary <A HREF="doc/Cookbook.html">Cookbook</A> is available, as are
a <a href="doc/tutorial/index.html">tutorial</a>, a <A HREF="doc/faq.html">FAQ</A> and
the <A HREF="doc/api/index.html">javadoc</A>.
Work has also begun on a <a href="doc/manual/index.html">User's Manual</a>
</body>
</html>
|