天天看点

JMeter运行通过Chrome打开的website

部分website在chrome上运行正常,但在IE环境运行会存在问题。而是用 JMeter运行通过chrome打开的website时候,需要处理一下。

可以参考下面几篇文章:

<a href="http://ninjawebzen.com/running-jmeter-with-chromedriver/" target="_blank">http://ninjawebzen.com/running-jmeter-with-chromedriver/</a>

摘录部分要点信息如下:

Once download finished, extract zip archive somewhere temporary. Then open the folder where your JMeter located, navigate to ..\apache-jmeter-2.13\lib and paste all .jar files from WebDriver plugin ..\lib. Open ..\apache-jmeter-2.13\lib\ext and paste .jar file from WebDriver plugin ..\lib\ext.

Right click on a Test Plan =&gt; Add =&gt; Threads =&gt; Config Element =&gt; and make verify is presented Chrome Driver Config.

Now lets set the project:

1. Add Thread Group

2. Then Chrome Driver Config (right click on Thread Group =&gt; Add =&gt; Config Element =&gt; Chrome Driver Config)

You would need to specify location of chromedriver.exe (btw download it, if you haven't yet), then open Chrome Driver Config and switch to Chrome tab and add path, it would be something like:

3. Add WebDriver Sampler (right click on Thread Group =&gt; Add =&gt; Sampler =&gt; WebDriver Sampler)

And add some test code:

<a></a>

Run the tests!

You might have an error message like that on first run

Then problem is duplicate files in your lib folder, so if problem appear open JMeter lib folder and make sure there is no duplicates.

like this:

For more information check out Blazemeter posts

本文转自 念槐聚 博客园博客,原文链接:http://www.cnblogs.com/haochuang/p/6932945.html,如需转载请自行联系原作者

继续阅读