jWebUnit Installation

Using Maven

If your project use Maven 2, it's very simple. Just add the plugin you want as dependency:

<?xml version="1.0" encoding="UTF-8"?>
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.compagny.myproject</groupId>
    <artifactId>myproject</artifactId>
    <version>0.0.1</version>
    <description>A wonderful project using jWebUnit</description>
    <dependencies>
        <dependency>
            <groupId>net.sourceforge.jwebunit</groupId>
            <artifactId>jwebunit-htmlunit-plugin</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
		

Download

If you don't want to use Maven, you can download files manually. First download latest stable version of jWebUnit from the files area and expand to a local directory.

Choose what plugin you want to use

There are currently 1 available plugin:

  • HtmlUnit: A good choice if you want rapidity and good Javascript support.
  • Selenium: You can run your tests directly in your favorite browser.

Integrate with IDE

The simplest way to manage dependencies is to use Maven 2. If your POM is well configured, just run:
mvn eclipse:eclipse
This will create the .project and the .classpath for your eclipse project.

If you don't want to migrate to Maven, make sure you add the jwebunit-htmlunit-plugin-1.3.jar, jwebunit-core-1.3.jar and all HtmlUnit dependencies (these files are in lib/ folder of the jWebUnit package) to your classpath in your IDE.