How do you pass values ββfrom non-GUI mode? via CSV, using properties, user parameters, etc.?
If CSV, this is a simple fix. Just create the User Defined Variables (UDV) object at the level of the test plan and the "hard code" of all your parameters (server, port, etc.). Save the CSV configuration. If you run GUI mode, disable CSV and enable UDV. When you save the file, keep the CSV turned on and the UDV disabled - this way when you start from a non-GUI, it will read the CSV file.
If you use properties, I would do the following: Create a UDV with all your parameters (Server, etc.). Before entering values, copy the component so that you have two identical UDVs. In UDV 1, enter the value of the property from the command line. In UDV 2, enter hardcoded values. Throughout the script, replace any property references with variable references. It will look something like this:
UD1: UD2: Name Value Name Value SERVER ${__P(Server)} SERVER devdomain.com PORT ${__P(Port)} PORT 4111 Some HTTP Request Domain: ${SERVER}
If you use custom parameters, this will be the same concept as above.
source share