At any time, all the code in SVN should be compilable and should pass all the unit tests. There is no guarantee that it will be full featured - this is a work in progress.

Latest build

You can download the latest build from our Cruise Control server kindly hosted by Canoo AG .

Checking out SVN repository

Another way to get the latest code is through SVN. Create a directory for HtmlUnit (for instance c:\htmlunit or ~/htmlunit). Change to that directory and execute the following commands.

svn co https://htmlunit.svn.sourceforge.net/svnroot/htmlunit/trunk/htmlunit .
            

Compiling the code

Although it is still possible to compile the code with Ant 1.5 or higher, the preferred way to build HtmlUnit is with maven 2 .

mvn compile

This will do an incremental compile of all the code.

mvn clean compile

This will do a clean compile of all the code.

Dependencies for IDE

Usually, you need to get the JARs for your IDE. You can do that by:

ant initialize

This will download all required and optional JARs into ant-jars folder. Note that HtmlUnit is mostly at the bleeding edge, to the extent that an HtmlUnit-local repository has been created to store snapshots of various dependencies.

Running the tests

All the tests are based on JUnit . The standard maven way of running the tests results in a large number of test reports which can be difficult to sift through to find failures. The fast-test goal has been created to provide a quick run of the tests that dumps easy status information to the command line.

mvn test

This will force a recompile of the java classes if needed.

Packaging

mvn package

In the project's target directory you'll able to see the generated jar file with the name "htmlunit-" followed by the version number.

mvn source:jar

This generates a source jar file.

mvn source:test-jar

This will generate a jar file of the test sources.