I was wondering if you are able to combine two user variables into one. For example I have one user variable which is defined as the location of a root folder, and a second variable defined as a location from the root, down into a subfolder, and what I'm asking if its possible to put variable 1+variable 2 = a full path way?
so for example I have one variable as:
testData.directory = ${__P(testData.directory,C:\Users\MURPHYA1\Desktop\JMeter bodies)}
testData.testCases = ${__P(testData.testCases,\JMeter Basket body files)
and what i want to produce is: C:\Users\MURPHYA1\Desktop\JMeter bodies\JMeter Basket body files
Is this possible?
UPDATE
I now have the following config and quite a few test variables just for testing: JMeter Config
Note that variables cannot currently be nested; i.e. ${Var${N}} does not work. The __V (variable) function can be used to do this: ${__V(Var${N})}.
Step to implement the logic for passing the variable value to another Thread Group: Add a 'Regular Expression Extractor' post-processor as a child element of 1.1 HTTP Request (Fetcher) and fetch the value in a variable (say employeeID) Add a 'BeanShell Assertion' and write ${__setProperty(valueToPass,${employeeID})}
Add a second "User Defined Variables" element after yours. There every variable will be replaced by the values defined in your first element.
- User Defined Variables
- - test1 = a/
- - test2 = b
- User Defined Variables 2
- - test3 = ${test1}${test2}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With