简体   繁体   中英

JMeter jp@gc - HtmlUnit Driver Config

I would like to know how to run jp@gc - WebDriver Sampler using jp@gc - HtmlUnit Driver Config in JMeter .

WDS.sampleResult.sampleStart()
WDS.browser.get('http://jmeter-plugins.org')
WDS.sampleResult.sampleEnd()

Get Error Message:

Thread Name: Thread Group 1-1
Sample Start: 2017-06-29 16:49:13 IST
Load time: 7
Connect Time: 0
Latency: 0
Size in bytes: 1705
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 1705
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 500
Response message: java.lang.IllegalArgumentException: Cannot locate declared field class org.apache.http.impl.client.HttpClientBuilder.sslcontext
Build info: version: '2.47.0', revision: '0e4837e94b1fad0db93e88cd972ed3e235a22892', time: '2015-07-29 15:58:41'
System info: host: 'zconl-37', ip: '10.235.4.31', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: driver.version: HtmlUnitDriver

Response headers: SampleResult fields: ContentType: text/plain DataEncoding: UTF-8

Looking into Build info: version: '2.47.0' line it appears you are using something very outdated, I cannot reproduce your issue using the latest software

JMeter HtmlUnit演示

So my recommendations are:

  1. Install JMeter 3.2 (or whatever latest version will be available at JMeter Downloads page)
  2. Install JMeter Plugins Manager
  3. Install Selenium/WebDriver Support bundle using the JMeter Plugins Manager

    JMeter插件管理器WebDriver集安装

  4. Once done you should be able to use WebDriver plugins without any .jar versions clashes.

There's a Bug concerning wrong HttpComponent jar.

You can check HttpComponent location, it should be version 4.5.1, not earlier:

System.out.println(HttpClientBuilder.class.getProtectionDomain().getCodeSource().getLocation());

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM