Bug 57015 - JMeter point-to-point sampler doesn't allow to provide dynamic values
Summary: JMeter point-to-point sampler doesn't allow to provide dynamic values
Status: NEW
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2014-09-24 17:26 UTC by juanma.cvega
Modified: 2016-08-05 15:26 UTC (History)
2 users (show)

Test plan example (8.02 KB, text/plain)
2014-10-03 09:35 UTC, juanma.cvega

Note You need to log in before you can comment on or make changes to this bug.
Description juanma.cvega 2014-09-24 17:26:28 UTC
The point-to-point sampler in JMeter for request-reply messages doesn't allow to provide parameterized values. All configuration values must be hard coded into the sampler, so any attempt to create dynamic values for the jms broker host for example don't work.
Comment 1 Philippe Mouawad 2014-10-02 20:06:11 UTC
Can you provide a sample Test plan , describe the expected behaviour vs what you get ?

If possible make Test plan for ActiveMQ.
Comment 2 juanma.cvega 2014-10-03 09:35:03 UTC
Created attachment 32074 [details]
Test plan example

The test plan provides two user defined variables that are used to specify the broker host and port. Then, inside a thread group, the test tries to change the value of the JMS_BROKER_HOST variable in a bean sampler, providing another string, before running the jms point-to-point sampler. When running the test, it's easy to see in the View Results Tree how an exception is thrown saying the sampler cannot reach the broker in the specified host, that is the one defined in the user defined variables, not in the bean sampler. It can also be checked in the Debug sampler provided that the new value is stored in the user variable.
Comment 3 Sebb 2014-10-03 09:55:35 UTC
The provider URL is resolved at configuration time, i.e. before the thread runs the BeanShell Pre-processor.

It is possible to change variables using a Config test element such as the User Defined Variables element.
Comment 4 juanma.cvega 2014-10-03 10:19:02 UTC
Yes, that way it works. But other elements that provide dynamic ways of changing the value don't work. I've tried using Random Variable element, CSV Data Set Config or Bean Shell sampler and those don't work. 
The reason for this requirement is to be able to test clustered configurations. Without it, I'm forced to duplicate the test plan, providing a value for each of them.
Comment 5 The ASF infrastructure team 2022-09-24 20:37:57 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3437