Prerequisite
1. Download Apache JMeter from http://jmeter.apache.org/download_jmeter.cgi and UnZip2. Download WebDriver plugins for JMeter from http://jmeter-plugins.org/downloads/all/#Latest-Stable-Release and UnZip
3. Download Mozilla Firefox 26 from http://mozilla_firefox.en.downloadastro.com/old_versions/ and install
How to install Selenium Webdriver in Jmeter
1. Copy the jar files from 'lib' folder of JMeterPlugins-WebDriver and paste to Jmeter_Home/lib folder.2. Copy the files from ext folder and paste to Jmeter_Home/lib/ext folder.
3. Delete older / Duplicate http jars from Jmeter_Home/lib
Example:
httpclient-4.2.6.jar (delect this jar)
httpclient-4.5.jar
httpcore-4.2.5.jar (delect this jar)
httpcore-4.4.1.jar
httpmime-4.2.6.jar (delect this jar)
httpmime-4.5.jar
4. Now the Installation is Completed.
How to configure and run Jmeter
1. Start JmeterClick on Jmeter_Home/bin/ApacheJMeter.jar or jmeter.bat to open Jmeter window
2. Add 'Thread Group' under 'Test Plan'
Right-click on the Test Plan > Add > Threads (Users) > Thread Group
Number of Threads (users): 1
Ramp-Up Period (in seconds): 1
Loop Count: 1
3. Add 'jp@gc - Firefox Driver Config' under 'Thread Group'
Right-click on the Thread Group > Add > Config Element > jp@gc - Firefox Driver Config
4. Add 'jp@gc - WebDriver Sampler' Sampler under 'Thread Group'
Right-click on the Thread Group > Add > Sampler > jp@gc - WebDriver Sampler
WDS.sampleResult.sampleStart()
WDS.browser.get('http://www.google.com')
WDS.sampleResult.sampleEnd()
5. Add 'View Results in Table' and View Results Tree Listener under 'Thread Group'
Right-click on the Thread Group > Add > Listener > View Results Tree
Right-click on the Thread Group > Add > Listener > View Results in Table
6. Finally Save Test plan then Press Menu > Run > Start or 'Ctrl'+ 'R' to run Test plan
Open Firefox browser then navigate to 'http://www.google.com'
N.B: You can change all names like as 'Test Plan', 'Thread Group', 'Sampler' and 'Listener' name