2017-06-29 110 views
0

我想知道如何运行[email protected] - 使用[email protected] - HtmlUnit Driver Config的WebDriver取样器在JMeter中。JMeter jp @ gc - HtmlUnit驱动程序配置

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

收到错误消息:

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 

响应头: SampleResult领域: 的ContentType:text/plain的 DataEncoding:UTF-8

回答

1

展望Build info: version: '2.47.0'线看起来你正在使用非常过时,使用最新的软件,我不能重现您的问题

JMeter HtmlUnit Demo

所以我的建议是:

  1. 安装JMeter 3.2(或任何最新版本将在JMeter Downloads页)
  2. 安装JMeter Plugins Manager
  3. 使用JMeter的插件管理器

    JMeter Plugins Manager WebDriver Set Installation

  4. 一旦完成安装Selenium/WebDriver Support包你应该能够使用WebDriver插件没有任何.jar版本冲突。
+0

嗨,我根据上述解决方案进行更改,但现在我又得到了另一个错误。 –

0

有一个Bug有关错误HttpComponent罐子。

您可以检查HttpComponent的位置,应该是4.5.1版本,而不是更早:

System.out.println(HttpClientBuilder.class.getProtectionDomain().getCodeSource().getLocation()); 
相关问题