diff --git a/test/pom.xml b/test/pom.xml
index a5014fac9c5033fee83c812c45c3a1eab809d934..6091a9222e47b0d13e9c8d9944e7454d3264a8e4 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -64,6 +64,16 @@ THE SOFTWARE.
${project.groupId}maven-plugin${maven-plugin.version}
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+ org.apache.httpcomponents
+ httpcore
+
+ org.jenkins-ci.plugins
@@ -127,16 +137,9 @@ THE SOFTWARE.
1.3
- org.jenkins-ci
+ net.sourceforge.htmlunithtmlunit
- 2.6-jenkins-6
-
-
-
- xml-apis
- xml-apis
-
-
+ 2.18xalan
diff --git a/test/src/main/java/com/gargoylesoftware/htmlunit/README.md b/test/src/main/java/com/gargoylesoftware/htmlunit/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5aadb8e2936ffe191c82c4ce9513577e17b92fa4
--- /dev/null
+++ b/test/src/main/java/com/gargoylesoftware/htmlunit/README.md
@@ -0,0 +1,39 @@
+# Overview
+Jenkins used to maintain a forked version of HtmlUnit and use it via `JenkinsRule` (and `HudsonTestCase`). Moving
+away from the forked version has allowed Jenkins GUI to start using more modern JavaScript libraries than were
+possible through the forked version.
+
+Moving away from the forked version also means that some tests in plugins may no longer compile due to the
+fact that they were using some methods that were added to the fork, but not available in the mainstream HtmlUnit.
+To help with that, the test harness now provides static utilities for all of this functionality.
+
+# WebClientUtil
+The `WebClientUtil` class provides static utilities for interacting asynchronously with HtmlUnit's `WebClient`,
+supporting `waitForJSExec` calls to allow your test code wait for background (asynchronous) JavaScript code to complete
+before the test continues. Calling these methods are not required in many cases as they are called for you from
+other static utilities (e.g. `HtmlFormUtil.submit`), but sometimes it is required to call them directly.
+
+Because HtmlUnit executes JavaScript asynchronously, it's usually not possible to block and catch exceptions. For
+that reason, `WebClientUtil` provides the `addExceptionListener` utility as a way of registering an exception listener.
+This typically needs to be used in conjunction with the `waitForJSExec` method e.g.
+
+```java
+WebClient webClient = jenkinsRule.createWebClient();
+WebClientUtil.ExceptionListener exceptionListener = WebClientUtil.addExceptionListener(webClient);
+
+// Interact with Jenkins UI as normal in a test...
+
+// Make sure all background JavaScript has completed so as expected exceptions have been thrown.
+WebClientUtil.waitForJSExec(webClient);
+
+// Now we can check for exceptions etc...
+exceptionListener.assertHasException();
+ScriptException e = exceptionListener.getScriptException();
+Assert.assertTrue(e.getMessage().contains("simulated error"));
+```
+
+# HtmlElementUtil, HtmlFormUtil and DomNodeUtil
+These classes provide static utility methods to replace functionality that was added to the forked HtmlUnit e.g.
+for triggering `