Bug 35370 - Sampler name is sometimes incorrect in listeners reports
Summary: Sampler name is sometimes incorrect in listeners reports
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.0.3
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-15 15:19 UTC by Pierre Castel
Modified: 2006-04-30 11:00 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Castel 2005-06-15 15:19:00 UTC
When a sampler has a name which corresponds to the name of a header declared in 
a HTTP Header Manager component its name is well reported in listeners the 
first time it is processed but it is replaced by the name of the first variable 
component (maybe other kind of components are eligible for giving the 
replacement name) next times the sampler is processed.

For instance, consider the following Test Plan :
Test Plan
|----- Thread Group (looping infinitely)
       |----- Interleave Controller
              |----- HTTP Sampler (named "Test 01")
              |----- HTTP Sampler (named "Test 02")
              |----- HTTP Sampler (named "Test 03")
              |----- Results Table
       |----- Java Sampler (sleep request - optional)
       |----- HTTP Header Manager (with a header called "Test 02")
       |----- User Defined Variables (named "My Var")

By launching it the Results table listener should display something like this :
  - Test 01
  - Test 02 <==== first time it'OK
  - Test 03
  - Test 01
  - My Var <==== next times name is KO
  - Test 03
  - Test 01
  - My Var
  - Test 03
  ...

Remark :
The bug is not linked to the Interleave controller. With a Random
controller the same behaviour is observed (the first time test #2 is
processed "Test 02" is displayed, next times the name is replaced by "My
Var").
Comment 1 Sebb 2005-06-16 00:57:20 UTC
Bug is also not dependent on any controllers - all it needs is a Header Manager
and sampler with the same name as a header.

I've fixed the code in CVS Head - I hope.
Comment 2 Sebb 2005-06-16 12:12:27 UTC
The fix seems to work, but changes the name of one of the entries in test 
plans, so is not backward compatible - i.e. existing plans don't work...
This obviously needs to be backed-out or further fixed.

By the way, a header manager should normally be added as a child of the target 
http sampler. In your example the Header Manager is in scope for all the 
samplers...
Comment 3 Pierre Castel 2005-06-16 13:46:45 UTC
Using a same HTTP Header Manager with several samplers is another subject, 
isn't it ?
Moreover I have not found such a restriction in User's manual. I only saw that 
point : "If there is more than one Header Manager in the scope of a Sampler, 
there is currently no way to specify which one is to be used." (which is not 
the same thing)

In any cases if the HTTP Header Manager is in the scope of all the samplers in 
my example this is because, in my personal case, same headers have to be used 
for all the samplers (duplicating the HTTP Header Manager would not be very 
user-friendly and especially not easy to maintain).
Comment 4 Sebb 2005-06-17 02:07:44 UTC
Yes, you can share the HeaderManager between samplers.
In your case you could add it to the InterLeave Controller, so that it only
applied to the HTTP samplers.

==

I've updated CVS again - this time existing test plans should still work.
Comment 5 The ASF infrastructure team 2022-09-24 20:37:35 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1561