I've below setup, i've tried to pass the value from non-gui mode but it doesn't work.
- Config Element/User Defined Variable: portNum:8080
- Config Element/HTTP Request Defaults: Port Number: ${__P(portNum,${portNum})}
- I've created 2 If Controller something like below. It will execute those if controller if it match the port number First If Controller: ${__jexl3("${portNum}" == "8080")} Second If Controller: ${__jexl3("${portNum}" == "8888")}
- It works when i run it from GUI mode but not from command line c:\jmeter\apache-jmeter-5.2.1\apache-jmeter-5.2.1\bin> jmeter -DportNum=8888 c:\Jmeter\TestVariable.jmx
From the command line, i've set the portNum value with 8888. but it didn't work. Any ideas how to solve this?