天天看點

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,如需轉載請自行聯系原作者

繼續閱讀