I am executing a test plan using firefox driver config and I have downloaded the firefox driver i.e. geckodriver.exe and store it in a D: drive. Now I have used the firefox driver config in my test plan and don't know where to set the path for geckodriver.exe. Below I have shared the image for more information. Please refer to the same.

enter image description here

Jmeter logs:

2020-04-09 11:53:12,024 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2020-04-09 11:53:12,097 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-04-09 11:53:12,176 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2020-04-09 11:53:12,356 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2020-04-09 11:53:12,356 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2020-04-09 11:53:12,356 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2020-04-09 11:53:12,356 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false
2020-04-09 11:53:12,382 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2020-04-09 11:53:12,382 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2020-04-09 11:53:12,449 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
2020-04-09 11:53:12,684 ERROR o.a.j.t.JMeterThread: Error calling threadStarted
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
    at com.google.common.base.Preconditions.checkState(Preconditions.java:847) ~[guava-25.0-jre.jar:?]
    at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:125) ~[selenium-remote-driver-3.14.0.jar:?]
    at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:43) ~[selenium-firefox-driver-3.14.0.jar:?]
    at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:168) ~[selenium-firefox-driver-3.14.0.jar:?]
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:346) ~[selenium-remote-driver-3.14.0.jar:?]
    at com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig.createBrowser(FirefoxDriverConfig.java:99) ~[jmeter-plugins-webdriver-3.1.jar:?]
    at com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig.createBrowser(FirefoxDriverConfig.java:22) ~[jmeter-plugins-webdriver-3.1.jar:?]
    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.getPreparedBrowser(WebDriverConfig.java:233) ~[jmeter-plugins-webdriver-3.1.jar:?]
    at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:220) ~[jmeter-plugins-webdriver-3.1.jar:?]
    at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:762) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:994) [jorphan.jar:5.1.1 r1855137]
    at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:977) [jorphan.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:730) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:718) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:249) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
2020-04-09 11:53:12,778 INFO o.a.j.s.FileServer: Stored: D:/JmeterSeleniumScripts/LcCsvData.csv
2020-04-09 11:53:12,802 ERROR o.a.j.t.JMeterThread: Error while processing sampler: 'jp@gc - WebDriver Sampler'.
java.lang.IllegalArgumentException: Browser has not been configured.  Please ensure at least 1 WebDriverConfig is created for a ThreadGroup.
    at com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler.sample(WebDriverSampler.java:62) ~[jmeter-plugins-webdriver-3.1.jar:?]
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
2020-04-09 11:53:12,816 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
2020-04-09 11:53:12,816 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
2020-04-09 11:53:12,816 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2020-04-09 11:53:12,816 INFO o.a.j.s.FileServer: Close: D:/JmeterSeleniumScripts/LcCsvData.csv
2020-04-09 11:53:12,835 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

2 Answers 2

  1. Add the next line to system.properties file (lives in "bin" folder of your JMeter installation)

  2. Restart JMeter to pick the property up

Another option is providing the path to the geckodriver executable via -D command-line argument like:

jmeter -Dwebdriver.gecko.driver=d:/geckodriver.exe -t /path/to/your/testplan.jmx 

More information: Apache JMeter Properties Customization Guide

  • No words for you ! Just Thank to you for always there for us !!
    – Rajan
    Commented Apr 13, 2020 at 12:50

From error logs it is clear that binary is not present at system path. From information provided, I'm not sure how are you setting up System path from Jmeter.

The easiest work around for this issue is add folder to windows system path where you have stored the driver binary file. May be some folder from D drive where you have stored it. That way without setting up a system path in Jmeter/code, you will be able find binary on System path.

  • From where I get the windows system path ?? I will put the firefox driver folder directly there and will execute the test plan as per your solution provided.
    – Rajan
    Commented Apr 10, 2020 at 16:25
  • 1
    Here is link helpdeskgeek.com/windows-10/… Commented Apr 10, 2020 at 16:30
  • I have done this already !! In environment variables -> system variables -> path . In this I have set the path till firefox driver folder path.
    – Rajan
    Commented Apr 10, 2020 at 16:38
  • Is it possible for you to post your jmx on GitHub? I'll have a look tomorrow morning Commented Apr 10, 2020 at 16:40
  • Okay tommorow morning I will post the code there ,,,,, will notify you by commenting here ! Thanks a lot .
    – Rajan
    Commented Apr 10, 2020 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.