HtmlUnit Driver Config

Download

Introduction

Add this configuration to enable browser based performance testing using HtmlUnit. This document covers the various configuration options available on the HtlmUnit browser (GUI-Less browser for Java programs). For an overview of performing client sider performance testing, refer to the Web Driver Tutorial.

HtmlUnit is a good compromise between speed of execution and the CPU usage per thread while maintaining Selenium API. The main drawback is that there is no screen so it's more difficult to understand the cause of problems and also that the javascript engine is not powerful as browsers such Firefox or Chrome.

Different browsers have different levels of setup complexity. Using a HtmlUnit Browser is considered to have an medium level of setup complexity. This is because of the additional installation step required (below).

(Additional) Installation step

JMeter ships with HttpClient v4.2.x, however for the latest HtmlUnit to work properly, it must be upgraded to v4.3.x. So for this to work, the user must remove the following JarFiles from the JMeter lib/ directory:

  1. httpclient-4.2.*.jar
  2. httpcore-4.2.*.jar
  3. httpmime-4.2.*.jar

On startup, the user is presented with the following:

The main part of the HtmlUnit configuration UI lies in the tabs:

  1. Proxy
  2. HtmlUnit
  3. Experiemental

Proxy

The default configuration (Use system proxy) is suitable for most. However, if you operate within a corporate network (that use http proxies), then this section may be important to you.

No proxy

Use this option if you directly connect to the internet, and your network will not make use of any proxies.

Auto-detect proxy settings

Some networks will automatically transmit the proxy configuration. This is especially true for Microsoft Windows networks that make use of WPAD/PAC to transmit the proxy configuration to its host.

Use system proxy settings

This is the default configuration, and will make use of the network and/or proxy settings configured for your Operating System.

Manual proxy configuration

This is the most involved, but also allows for the most control of you proxy settings.

HTTP Proxy/Port

Specify the name/IP Address of the HTTP proxy server and its associated port to use when the browser makes external network connections.

Use HTTP proxy server for all protocols

By default this is checked, as most environments use the same HTTP Proxy server for its SSL, FTP and SOCKS connections. However, if this is not the case, then uncheck this option, and override the settings for the other connections.

HTTPS Proxy/Port

Specify the name/IP Address of the HTTPS proxy server and its associated port to use when the browser makes external network connections.

FTP Proxy/Port

Specify the name/IP Address of the FTP proxy server and its associated port to use when the browser makes external network connections.

SOCKS Proxy/Port

Specify the name/IP Address of the SOCKS proxy server and its associated port to use when the browser makes external network connections.

No Proxy for =

This is a comma separated list of all host(s) and/or IP Address(es) that will bypass the proxy server.

Automatic proxy configuration URL

For networks that have a proxy configuration server (PAC), and its name and the location of the PAC file is known, please use this option. The usual configuration for this is http://proxy-server/proxy.pac

HtmlUnit

This tab is intentionally left empty. As more features get added, this tab will contain customisations specific to the HtmlUnit browser instance used for the tests. See the Roadmap document for future plans. By default the javascript capability is enabled to be more compatible with web site.

Experimental

As new features from the Roadmap are added, new and experimental features will generally get added to this section first. This allows the early adopters to use these features and provide feedback on them. However, it should be recognised that all features added to this tab are subject to change/removal so depend on them at your own peril!