HTML and CSS Reference
In-Depth Information
Code View:
import junit.framework.TestCase;
import net.sourceforge.jwebunit.junit.*;
public class LinkChecker extends TestCase {
private WebTester tester;
public LinkChecker(String name) {
tester = new WebTester();
public void testFormSubmission() {
// start at this page
// check that the form we want is on the page
/// check that the input element we expect is present
// type something into the input element
tester.setTextField("s", "Linux");
// send the form
// we're now on a different page; check that the
// text on that page is as expected.
tester.assertTextPresent("Windows Vista");
FitNesse ( ) is a Wiki designed to enable business users to write tests in table format.
Business users like spreadsheets. The basic idea of FitNesse is that tests can be written as tables, much like a
spreadsheet. Thus, FitNesse tests are not written in Java. Instead, they are written as a table in a Wiki.
You do need a programmer to install and configure FitNesse for your site. However, once it's running and a few
sample fixtures have been written, it is possible for savvy business users to write more tests. FitNesse works
best in a pair environment, though, where one programmer and one business user can work together to define
the business rules and write tests for them.
For web app acceptance testing, you install Joseph Bergin's HtmlFixture
( ) . It too is based on HtmlUnit. It supplies instructions that are useful
for testing web applications such as typing into forms, submitting forms, checking the text on a page, and so
Search WWH ::

Custom Search