I am using JMeter to load test a SOAP webservice. The webservice exists in a bunch of places, like my localhost, a dev box, an integration box, a production box, etc.
I am using a WebService(SOAP) Request Sampler and have set the "Server Name of IP", "Path", and "SOAP Action" paramaters like so:
Server Name of IP: ${SERVER}
Path: ${PATH}/service
SOAPAction: http://${SERVER}${PATH}service#action
This works fine when using a "User Defined Variables" config element. I just change SERVER and PATH to whatever is specific to the location I am trying to hit. However, this is more of a pain in the butt then I want to deal with. What I was hoping to do (and tried) was to add multiple If Logic Controllers in my Thread Group and check for ${MODE} (another UDV) and act accordingly, setting up my SERVER and PATH. So, I had something like
"${MODE}" == "dev"
"${MODE}" == "local"
"${MODE}" == "production"
One on each If Controller, then I had a child UDV element setting the appropriate SERVER and PATH. The values from the last UDV (in order of appearance in my Thread Group) was always being used, despite my assumption the If Controller returning false would keep the UDV from being evaluated. However, I see in the docs that all UDVs are evaluated regardless of the location before any threads are started. So, I tried using User Paramaters instead, but the values for ${SERVER} and ${PATH} in my SOAP sampler do not get replaced and I am making requests to http://${SERVER}${PATH} which is not good.
It there any elegant way to handle this? Currently I am just copying an pasting the values for SERVER and PATH every time I need to change the server I am hitting. I know I could also have multiple Test Plans, one for each server I am going to load test, but I make frequent updates to the structure including adding new tests, disabling existing tests and changing some parts of the SOAP requests so having a bunch of them does not seem like a good solution.
Any help?