Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit 79cd42c

Browse files
committed
Update documentation and site.
1 parent 1a72424 commit 79cd42c

10 files changed

Lines changed: 71 additions & 175 deletions

File tree

src/changes/changes.xml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
Refactoring of Table assertions to handle perfectly colspan and rowspan.
1111
</action>
1212
<action type="add" dev="Julien Henry">
13-
Added XPath methods to core API. Only HtmlUnit and Selenium implement it.
14-
</action>
15-
<action type="add" dev="Julien Henry">
16-
Added Selenium plugin module. SeleniumDialog uses Selenium-RC project, that take control of
17-
your web browser to execute the tests. Main advantage is perfect Javascript support. Drawbacks are:
18-
tests are slow; you need a browser and an X server.
13+
Added XPath methods to core API. HttpUnit doesn't support clickElementByXPath().
1914
</action>
2015
<action type="update" dev="Julien Henry">
2116
Split jWebUnit in modules: one for the core (jWebUnit API), one for the tests (that all plugins should pass),
22-
and one for each plugin (currently HtmlUnit, HttpUnit and Jacobie). This way, for example, when you want to use
17+
and one for each plugin (currently HtmlUnit and HttpUnit). This way, for example, when you want to use
2318
HtmlUnit plugin, you don't have to include all HttpUnit dependencies.
2419
</action>
2520
<action type="update" dev="Julien Henry">
@@ -31,9 +26,6 @@
3126
<action type="add" dev="Julien Henry">
3227
Added Maven 2 support. There are many reports available on the website.
3328
</action>
34-
<action type="add" dev="Nick Neuberger">
35-
Added JacobieDialog.
36-
</action>
3729
<action type="add" dev="Jim Weaver" issue="1004243" due-to="Srinivasan Ranganthan">
3830
Added HttpUnitDialog setter on WebTester in case someone using delegation wants to carry
3931
state from one tester to another. Also made some signatures on WebTester public that
-729 Bytes
Binary file not shown.
-3.85 KB
Loading

src/site/resources/licenses/Rhino_license.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/site/resources/licenses/httpunit_license.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/site/resources/licenses/jWebUnit_license.txt

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/site/xdoc/building-maven.xml

Lines changed: 4 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -53,94 +53,16 @@
5353
<source>mvn package</source>
5454
If you build jWebUnit for the first time and you configured Maven as described
5555
earlier, you will see the following text:
56-
<source><![CDATA[
57-
[INFO] Scanning for projects...
58-
[INFO] ----------------------------------------------------------------------------
59-
[INFO] Building jWebUnit
60-
[INFO] task-segment: [package]
61-
[INFO] ----------------------------------------------------------------------------
62-
[INFO] artifact org.apache.maven.plugins:maven-jar-plugin: checking for updates from Maven CodeHaus Snapshots
63-
[INFO] snapshot org.apache.maven.plugins:maven-jar-plugin:2.1-SNAPSHOT: checking for updates from Maven CodeHaus Snapshots
64-
[INFO] [resources:resources]
65-
[INFO] Using default encoding to copy filtered resources.
66-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/jacobie/jacobie/1.3/jacobie-1.3.pom
67-
612b downloaded
68-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/jacobie/jacobie/1.3/jacobie-1.3.pom - IGNORING
69-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/jacob-project/jacob/1.7/jacob-1.7.pom
70-
423b downloaded
71-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/jacob-project/jacob/1.7/jacob-1.7.pom - IGNORING
72-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/htmlunit/htmlunit/1.9-prerelease/htmlunit-1.9-prerelease.pom
73-
8K downloaded
74-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/htmlunit/htmlunit/1.9-prerelease/htmlunit-1.9-prerelease.pom - IGNORING
75-
[WARNING]
76-
Artifact commons-logging:commons-logging:jar:1.0.4:test retains local scope 'test' overriding broader scope 'compile'
77-
given by a dependency. If this is not intended, modify or remove the local scope.
78-
79-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.pom
80-
1K downloaded
81-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.pom - IGNORING
82-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.jar
83-
397K downloaded
84-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/httpunit/httpunit/1.6.1-20060101/httpunit-1.6.1-20060101.jar - IGNORING
85-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/jacobie/jacobie/1.3/jacobie-1.3.jar
86-
32K downloaded
87-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/jacobie/jacobie/1.3/jacobie-1.3.jar - IGNORING
88-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/htmlunit/htmlunit/1.9-prerelease/htmlunit-1.9-prerelease.jar
89-
356K downloaded
90-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/htmlunit/htmlunit/1.9-prerelease/htmlunit-1.9-prerelease.jar - IGNORING
91-
Downloading: file:D:\jhenry\jwebunit\jWebUnit/private-repository/net/sourceforge/jacob-project/jacob/1.7/jacob-1.7.jar
92-
16K downloaded
93-
[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sourceforge/jacob-project/jacob/1.7/jacob-1.7.jar - IGNORING
94-
[INFO] [compiler:compile]
95-
Compiling 21 source files to D:\jhenry\jwebunit\jWebUnit\target\classes
96-
[INFO] [resources:testResources]
97-
[INFO] Using default encoding to copy filtered resources.
98-
[INFO] [compiler:testCompile]
99-
Compiling 25 source files to D:\jhenry\jwebunit\jWebUnit\target\test-classes
100-
[INFO] [surefire:test]
101-
[INFO] Setting reports dir: D:\jhenry\jwebunit\jWebUnit\target/surefire-reports
102-
103-
-------------------------------------------------------
104-
T E S T S
105-
-------------------------------------------------------
106-
[surefire] Running net.sourceforge.jwebunit.AllTests
107-
log4j:WARN No appenders could be found for logger (org.mortbay.xml.XmlParser).
108-
log4j:WARN Please initialize the log4j system properly.
109-
[surefire] Tests run: 151, Failures: 2, Errors: 20, Time elapsed: 15,907 sec <<<<<<<< FAILURE !!
110-
[ERROR] There are test failures.
111-
[INFO] [jar:jar]
112-
[INFO] Building jar: D:\jhenry\jwebunit\jWebUnit\target\jwebunit-1.3-SNAPSHOT.jar
113-
[INFO] ------------------------------------------------------------------------
114-
[INFO] BUILD SUCCESSFUL
115-
[INFO] ------------------------------------------------------------------------
116-
[INFO] Total time: 27 seconds
117-
[INFO] Finished at: Mon Apr 24 14:14:52 CEST 2006
118-
[INFO] Final Memory: 7M/24M
119-
[INFO] ------------------------------------------------------------------------
120-
]]></source></p>
56+
<source><![CDATA[NEED UPDATE]]></source></p>
12157
<p>
122-
You now have successfully built the <tt>jwebunit-1.3-SNAPSHOT.jar</tt>.
123-
</p>
124-
</subsection>
125-
<subsection name="Building the site">
126-
<p>
127-
Generating the jWebUnit website with Maven is also not difficult:
128-
<source>mvn site</source>
129-
is all there's to it.
130-
After downloading lots and lots of jar files, Maven will build the website which
131-
contains junit results, checkstyle results, and the like, just like the website
132-
you're now looking at. You can find the website in the
133-
<source>target/site</source> directory.
134-
</p>
135-
<p>
136-
Just open the index.html in your browser.
58+
You now have successfully built the <tt>jwebunit-1.3.jar</tt>.
13759
</p>
13860
</subsection>
13961
<subsection name="Building an assembly">
140-
<p> An assembly is a package for final users.
62+
<p> An assembly is a package for final users, including eventually all dependencies.
14163
Building an assembly with Maven consists of executing Maven like this:
14264
<source>mvn assembly:assembly -DdescriptorId=XXX</source>
143-
Where XXX is:
65+
Where XXX is one of :
14466
<ul>
14567
<li>bin : Package jwebunit-xx.jar in 3 formats (zip, tar.gz and tar.bz2)</li>
14668
<li>jar-with-dependencies : Create jwebunit-xx-with-dependencies.jar, a big jar with all

src/site/xdoc/index.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@
22
<document>
33
<properties>
44
<author email="dashorst.at.users.sourceforge.net">Martijn Dashorst</author>
5-
<title>jWebUnit</title>
5+
<title>jWebUnit 1.x</title>
66
</properties>
77
<meta name="keyword" content="jwebunit, java, junit, htmlunit, jacobie, httpunit, integration, test, automated, html, webtest"/>
88
<head>
99
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
1010
</head>
1111
<body>
12+
<section name="Welcome">
13+
<p>
14+
You are on the jWebUnit 1.x website. Current version is 1.3 (will be available in a few days). This is
15+
the "stable" version of jWebUnit. You can also consult <a href="2.x/index.html">jWebUnit 2.x website</a>.
16+
</p>
17+
</section>
1218
<section name="What is jWebUnit?">
1319
<p>
1420
jWebUnit is a Java framework that facilitates creation of acceptance tests for web applications. It
1521
evolved from a project where we were using <a href="http://www.junit.org">JUnit</a> to create acceptance tests.
16-
Also, we have different testing engines: <a href="jwebunit-httpunit-plugin/index.html">HttpUnit</a>, <a href="jwebunit-htmlunit-plugin/index.html">HtmlUnit</a>, <a href="jwebunit-jacobie-plugin/index.html">Jacobie</a>
17-
and <a href="jwebunit-selenium-plugin/index.html">Selenium</a>.
22+
Also, we have different testing engines: <a href="jwebunit-httpunit-plugin/index.html">HttpUnit</a> and <a href="jwebunit-htmlunit-plugin/index.html">HtmlUnit</a>.
1823
As the tests were being written, they were continuously refactored to remove duplication and other bad smells in the test
1924
code. jWebUnit is the result of these refactorings.
2025
</p>
@@ -26,7 +31,7 @@
2631
via links, form entry and submission, validation of table contents, and other
2732
typical business web application features. This code try to stay independent of the libraries behind
2833
the scenes. The simple navigation methods and ready-to-use assertions allow for
29-
more rapid test creation than using only JUnit and HttpUnit/HtmlUnit/Jacobie/Selenium. And if you want to switch
34+
more rapid test creation than using only JUnit and HttpUnit/HtmlUnit. And if you want to switch
3035
from HttpUnit to HtmlUnit, no need to rewrite your tests.
3136
</p>
3237
<img src="images/jwebunit-architecture.png" alt="JWebUnit architecture"/>

src/site/xdoc/installation.xml

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,67 @@
66
</properties>
77
<body class="default">
88
<section name="jWebUnit Installation">
9-
<subsection name="Download">
9+
<subsection name="Using Maven">
1010
<p>
11-
First download latest stable version of jWebUnit from the <a href="http://sourceforge.net/projects/jwebunit/files">files area</a>
12-
and expand to a local directory.
11+
If your project use Maven 2, it's very simple. Just add jwebunit maven repository to your pom,
12+
and add the plugin you want as dependency:
1313
</p>
14+
<source>
15+
<?xml version="1.0" encoding="UTF-8"?>
16+
<project>
17+
<modelVersion>4.0.0</modelVersion>
18+
<groupId>com.compagny.myproject</groupId>
19+
<artifactId>myproject</artifactId>
20+
<version>0.0.1</version>
21+
<description>A wonderful project using jWebUnit</description>
22+
<repositories>
23+
<repository>
24+
<releases />
25+
<id>jwebunit-m2-repo-web</id>
26+
<name>jWebUnit private repository</name>
27+
<url>http://jwebunit.sourceforge.net/m2-repo</url>
28+
</repository>
29+
</repositories>
30+
<dependencies>
31+
<dependency>
32+
<groupId>net.sourceforge.jwebunit</groupId>
33+
<artifactId>jwebunit-htmlunit-plugin</artifactId>
34+
<version>1.3</version>
35+
<scope>test</scope>
36+
</dependency>
37+
</dependencies>
38+
</project>
39+
</source>
40+
</subsection>
41+
<subsection name="Download">
1442
<p>
15-
NB : We are currently performing great improvements to jWebUnit. If you want to get the
16-
latest, you can either get it from SVN, or download it from our
17-
<a href="http://jwebunit.sourceforge.net/m2-repo-snapshots/net/sourceforge/jwebunit/">private Maven 2 snapshots repository</a>.
43+
If you don't want to use Maven, you can download files manually.
44+
First download latest stable version of jWebUnit core and the plugin
45+
you want from the <a href="http://sourceforge.net/projects/jwebunit/files">files area</a>
46+
and expand to a local directory.
47+
You will also need all the dependencies of the plugin you choose. Please consult each
48+
plugin page to know what are these dependencies.
1849
</p>
1950
</subsection>
2051
<subsection name="Choose what plugin you want to use">
2152
<p>
22-
There are currently 4 available plugins (certain are still in development):
53+
There are currently 2 available plugins:
2354
<ul>
24-
<li>HttpUnit: Was the first supported plugin. Javascript support is very basic.</li>
25-
<li>HtmlUnit: A real solution if you want better Javascript support.</li>
26-
<li>Jacobie: You can run your tests directly in Ms Internet Explorer (Windows Only).</li>
27-
<li>Selenium: You can run your tests directly in your favorite browser.</li>
55+
<li>HttpUnit: Was the first supported plugin. Javascript support is very basic. Will not be supported in jWebUnit 2.x</li>
56+
<li>HtmlUnit: A good choice if you want better Javascript support.</li>
2857
</ul>
2958
</p>
3059
</subsection>
3160
<subsection name="Integrate with IDE">
3261
<p>
33-
The simplest way to manage dependencies is to use Maven 2. If you don't want to
34-
migrate to Maven, make sure you add the jwebunit-XXX-plugin (where XXX is the plugin you choose) and jwebunit-core jar files to your classpath in your IDE.
62+
The simplest way to manage dependencies is to use Maven 2. If your POM is well
63+
configured, just run:
64+
<source>mvn eclipse:eclipse</source>
65+
This will create the .project and the .classpath for your eclipse project.
66+
</p>
67+
<p>
68+
If you don't want to migrate to Maven,
69+
make sure you add the jwebunit-XXX-plugin (where XXX is the plugin you choose) and jwebunit-core jar files to your classpath in your IDE.
3570
You will also need numerous additionnal dependencies, depending on what plugin you choose.
3671
Please refer to each plugin page to know the dependencies they need.
3772
</p>

src/site/xdoc/quickstart.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p>
1010
The QuickStart contains sample code and guidance to get you started with jWebUnit. To see all
1111
of the methods available, consult the a <a href="apidocs/index.html">Javadocs</a> - particularly
12-
the WebTester class.
12+
the WebTestCase class.
1313
</p>
1414
<subsection name="Creating a TestCase">
1515
<p>
@@ -54,10 +54,11 @@ public class ExampleWebTestCase extends WebTestCase {
5454
super(name);
5555
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTTPUNIT);
5656
// or setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
57-
// or setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_JACOBIE);
5857
}
5958
}
6059
</source>
60+
NB: If you have only one plugin in your classpath, you don't need to explicitly specify
61+
to use it, jWebUnit will find and use it.
6162
</p>
6263
</subsection>
6364
<subsection name="Navigating Your Web Application">
@@ -155,10 +156,13 @@ or
155156
assertWindowPresent("popupWindow");
156157
}
157158
</source>
159+
158160
In the above examples, we are working with submit buttons and form elements by their
159161
name. For form elements, it is possible to work with them by label (string followed
160162
by colon before input element). Before using this approach, consider that the display
161163
label may change, but the submission name of the element will probably remain static.
164+
DEPRECATED: **WithLabel methods are only supported by httpunit plugin, and it's not a
165+
good way to identify form elements, as label can easily be localized.
162166
<source>
163167
public void testFormSubmission() {
164168
beginAt("/form.html");
@@ -270,8 +274,8 @@ or
270274
<source>
271275
public void testAgeTable() {
272276
beginAt("/agePage");
273-
ExpectedTable ageTable = new ExpectedTable(new Object[][] {
274-
{new ExpectedCell("Age Table", 2},
277+
ExpectedTable ageTable = new Table(new Object[][] {
278+
{new Cell("Age Table", 2, 1)},
275279
{"Name", "Age"},
276280
{"Jim", "30ish"},
277281
{"Wilkes", "20ish"}

0 commit comments

Comments
 (0)