1

I am executing the load test plan using the non-GUI mode of Jmeter and I want to set the chrome driver using non-GUI mode. I have used the below command for executing the test plan and storing the results.

jmeter -n -t D:\JmeterSeleniumScripts\LCOrderSummryReport.jmx -l D:\JmeterSeleniumScripts\lcOrderSummaryResults.jtl -f -e -o D:\JmeterSeleniumScripts\dashboard

Can anyone please help me how can I set chrome driver using command prompt.

asked Apr 8, 2020 at 12:04

1 Answer 1

1

Define a local JMeter property this way:

-J[prop_name]=[value]

In your case it may be :

jmeter -n -t WebDriverSampler.jmx -JChromeDriverPath=c:\soft\webdriver\chromedriver.exe

Read defined properties in JMeter with function _P and use it in "Chrome" tab of jp@gc - Chrome Driver Config:

${__P(ChromeDriverPath)}

You can pass and use any parameters this way.

enter image description here

Do not forget to put a default value in case you run the script without passing that JMeter property like:

${__P(ChromeDriverPath,c:\soft\webdriver\chromedriver.exe)}
answered Apr 8, 2020 at 13:11
3
  • 1
    So, I have to use like this ${__P(ChromeDriverPath,c:\soft\webdriver\chromedriver.exe)} in path to chrome driver ?? Commented Apr 8, 2020 at 13:24
  • Indeed, just try now) Commented Apr 8, 2020 at 13:30
  • 1
    Yes I have tried it before like this, but that didn't work ,,,,now I used only like this __P(chromeDriverPath) and in command prompt I used like this jmeter -n -t D:\JmeterSeleniumScripts\LCOrderSummryReport.jmx -l D:\JmeterSeleniumScripts\lcOrderSummaryResults.jtl -f -e -o D:\JmeterSeleniumScripts\dashboard -JUsers=4 -JRampUp=8 -JchromePathDriver=D:\chromeDriverForJmeter\chromedriver.exe and it's work fine now !! Commented Apr 8, 2020 at 13:31

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.