“Web Driver Sampler automates the execution and collection of Performance metrics on the Browser (client-side)” — link.
Prerequisites
- added jmeter-plugins-manager to jmeter (downloaded from — link ) in JMeter’s lib/ext directory
- installed chromdriver
Initial setup
Download plugin for JMeter — and put it into JMeter’s lib/ext directory. After placing jmeter-plugins-manager into the folder, restart JMeter.
Choose Options and go to Plugins Manager from navigation.
Choose Selenium/WebDriver from available plugins
Web Driver Sampler
Set up Test Plan
a) add Thread Group
b) add Listener
c) add WebDriver Sampler
c) add WebDriver config
Set up Chrome Driver Config
- add path to chromedriver (macos version, on windows with .exe). Path may be different - depending on where it was installed
Set up groovy script
- quotation — double
Run test
All test results are available in View Results Tree.
Troubleshooting
- The driver executable does not exist:
java.lang.IllegalStateException: The driver executable does not exist:
a) chromedriver is not installed, run:
brew install chromedriver
b) chromedriver installed — version of chromedriver installed and browser difference, run:
brew upgrade chromedriver
2. chromedriver can’t be opened
a) go to system preferences — and unlock padlock (click on it). Then click ‘Allow anyway’
3. To check console output, enable Log Viewer