Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 650057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:00:41+00:00 2026-05-13T22:00:41+00:00

I am using JMeter to load test a SOAP webservice. The webservice exists in

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:00:42+00:00Added an answer on May 13, 2026 at 10:00 pm

    We solved this problem with a BeanShell Sampler and variables defined in the Testplan itself.

    Instead of using the element “User Defined Variables” you can define variables for the entire Testplan. Just click on the root element of the tree and add a variable called “mode” with the content “dev”, “local” or “production”.

    In the testcase add the Sampler “Bean Shell Sampler” and add following code:

    if ("dev".equals(vars.get("mode"))) {
     vars.put("server","x.y.z");
    }
    if ("local".equals(vars.get("mode"))) {
     vars.put("server","127.0.0.1");
    }
    if ("production".equals(vars.get("mode"))) {
     vars.put("server","10.0.0.10");
    }
    

    You can then define all variables you need and also add other environments if needed.

    But you can also go a step further:
    Create a Simple Controller and put your Bean Shell Sampler there. In all ThreadGroups, you can now access to this Simple Controller with a Module Controller. In this case, you have to define your environment selector just once for the entire Testplan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using JMeter to do some load testing on a SOAP webservice. Currently
I am using JMeter to load test some pages that reside in a SharePoint
I recently started using JMeter to load test my webapp, locally on my pc.
I am looking to load test a consumer website. I have tried using JMeter.
We are using Jmeter to test our Php application running on the Apache 2
I have a GWT application and wanna to test load and functionality using a
I'm using Jmeter to do a load testing for a website. JMeter does not
How to you simulate > 120 concurrent users using a Load Test Framework such
We are using JMeter in a heterogeneous environment and we would like to measure
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.