Bug 63364 - When setting "subresults.disable_renaming=true", sub results are still renamed using their parent SampleLabel while they shouldn't
Summary: When setting "subresults.disable_renaming=true", sub results are still rename...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.1.1
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2019-04-18 21:31 UTC by Brian Tully
Modified: 2019-10-14 14:12 UTC (History)
2 users (show)



Attachments
screenshot of the JMeter5 ViewResultsTree regression with embedded resources labels (237.53 KB, image/png)
2019-04-18 21:31 UTC, Brian Tully
Details
with subresults.disable_renaming=true specified (219.30 KB, image/png)
2019-05-13 16:12 UTC, Brian Tully
Details
JMeter 5 trunk fixed embedded resource labels (361.74 KB, image/png)
2019-05-14 14:12 UTC, Brian Tully
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Tully 2019-04-18 21:31:39 UTC
Created attachment 36535 [details]
screenshot of the JMeter5 ViewResultsTree regression with embedded resources labels

Since updating to JMeter 5, the View Results Tree listener has a regression where it no longer displays the embedded resource request in the results. Instead it seems to assign each embedded resource the name of its parent request followed by an incremented number, e.g.:

https://www.google.com
- https://www.google.com-0
- https://www.google.com-1
- https://www.google.com-2
- https://www.google.com-3

Previously (JMeter 4 and lower), the View Results Tree would show the actual request as the name for each embedded resource rather than obfuscating them.

Any idea why this is the case? Is there an option/setting to revert to previous behavior?
Comment 1 Brian Tully 2019-05-13 14:46:39 UTC
Note that the issue occurs on ALL embedded resources, including those with or without query strings, i.e., 

- css files
- javascript files
- image files

JMeter 4's ViewResultsTree would show the actual URL path of the embedded resource, e.g., 

https://www.google.com (parent request)
- https://www.google.com/logos/doodles/2019/georgios-papanikolaous-136th-birthday-5142131667632128.2-l.png (embedded resource)

Whereas now in JMeter 5.x it shows as the following:

https://www.google.com (parent request)
- https://www.google.com-0 (embedded resource)
Comment 2 Philippe Mouawad 2019-05-13 14:49:50 UTC
Hello,
This is not a bug, it's a feature :-) :


To get 4.0 behaviour , set:

subresults.disable_renaming=true

*** This bug has been marked as a duplicate of bug 63055 ***
Comment 3 Brian Tully 2019-05-13 14:56:56 UTC
Wow, that's really considered a feature??? Any idea why this decision was made? And when you say to add subresults.disable_renaming=true, am I correct in assuming I add that to my user.properties?

Thank you!
Comment 4 Philippe Mouawad 2019-05-13 15:00:36 UTC
(In reply to Brian Tully from comment #3)
> Wow, that's really considered a feature??? Any idea why this decision was
> made? And when you say to add subresults.disable_renaming=true, am I correct
> in assuming I add that to my user.properties?
> 
> Thank you!

Hello,

Yes it was considered a feature. As with any change, some people are happy , others are not.

If you read the bugzilla Bug 63055 referenced and the 3 referenced bugs, you'll see why.

Yes either add it to user.properties or pass it on command line using -J option.

If you see better solutions to initial problem, feel free to comment.

Thank you
Comment 5 Brian Tully 2019-05-13 16:10:29 UTC
I don't think this should be marked as fixed or duplicate. I am still seeing the bug even when subresults.disable_renaming=true is set (either in user.properties or when specified through the command line -J option) as well as when the test plan has "Functional Test Mode" checked.

Instead of the embedded resource being named it's actual URL, or in the previous case it being named "Sampler-[n]" (Homepage-0), all it is doing is stripping the index off the renamed element.

So for a HTTP Sampler Request with a label of "Homepage", when looking at the ViewResultsTree result for Homepage request, I expect to see the label of the embedded resource to be the full path of the resource, e.g., https://example.com/logo.png.

Without "subresults.disable_renaming=true" specified, I see the embedded resource result label as "Homepage-0"

With "subresults.disable_renaming=true" specified, I see the embedded resource result label as "Homepage", i.e., the index is removed. However I was expecting to see the actual path of the embedded resource.

Is this no longer possible?

I've attached an updated screenshot.
Comment 6 Brian Tully 2019-05-13 16:12:16 UTC
Created attachment 36583 [details]
with subresults.disable_renaming=true specified

updated screenshot with subresults.disable_renaming=true

Note the embedded resource is still not correctly named. It still overwrites the label to the parent's name.
Comment 7 Philippe Mouawad 2019-05-14 13:14:34 UTC
Author: pmouawad
Date: Tue May 14 13:14:11 2019
New Revision: 1859230

URL: http://svn.apache.org/viewvc?rev=1859230&view=rev
Log:
Bug 63364 - When setting "subresults.disable_renaming=true", sub results are still renamed using their parent SampleLabel while they shouldn't
Bugzilla Id: 63364

Added:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/SamplingNamingTest.java   (with props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPAbstractImpl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPJavaImpl.java
    jmeter/trunk/xdocs/changes.xml
Comment 8 Philippe Mouawad 2019-05-14 13:46:54 UTC
Hello,
Can you try the nightly build here:
https://builds.apache.org/job/JMeter-trunk/

Issue should be fixed now with subresults.disable_renaming=true.

Thanks
Comment 9 Brian Tully 2019-05-14 14:10:32 UTC
(In reply to Philippe Mouawad from comment #8)
> Hello,
> Can you try the nightly build here:
> https://builds.apache.org/job/JMeter-trunk/
> 
> Issue should be fixed now with subresults.disable_renaming=true.
> 
> Thanks

Hi Phillippe - 

Thanks again for looking into this and for the fix. Indeed things are working as expected in trunk when `subresults.disable_renaming=true` is added to user.properties.

I'll upload another screenshot that shows the fix :)

Thanks again!
Comment 10 Philippe Mouawad 2019-05-14 14:12:12 UTC
(In reply to Brian Tully from comment #9)
> (In reply to Philippe Mouawad from comment #8)
> > Hello,
> > Can you try the nightly build here:
> > https://builds.apache.org/job/JMeter-trunk/
> > 
> > Issue should be fixed now with subresults.disable_renaming=true.
> > 
> > Thanks
> 
> Hi Phillippe - 
> 
> Thanks again for looking into this and for the fix. Indeed things are
> working as expected in trunk when `subresults.disable_renaming=true` is
> added to user.properties.
> 
> I'll upload another screenshot that shows the fix :)
> 
> Thanks again!

Thanks for your feedback Brian.

Regards
Philippe M. 

https://leanpub.com/master-jmeter-from-load-test-to-devops
Comment 11 Brian Tully 2019-05-14 14:12:24 UTC
Created attachment 36584 [details]
JMeter 5 trunk fixed embedded resource labels
Comment 12 Vladimir Sitnikov 2019-06-28 20:29:57 UTC
This change induces flaky CI failures: 

https://travis-ci.org/vlsi/jmeter/jobs/551939913#L1036-L1040

org.apache.jmeter.protocol.http.sampler.SamplingNamingTest > testBug63364[Run 1: implementation:Java] FAILED
    java.lang.AssertionError: We have at least one sample result
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.apache.jmeter.protocol.http.sampler.SamplingNamingTest.testBug63364(SamplingNamingTest.java:55)


What is the nature of the failure?
Could it be fixed?

Frankly speaking, I do not understand what "We have at least one sample result" error message means.
Comment 13 Philippe Mouawad 2019-07-18 07:25:50 UTC
This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f25fa3  Bug 63364 - When setting "subresults.disable_renaming=true", sub results are still renamed using their parent SampleLabel while they shouldn't
     new 875b2db  Merge branch 'master' of https://github.com/apache/jmeter
3f25fa3 is described below

commit 3f25fa39a324695b133b3ed1b232a6562b664f59
Comment 14 Brian Tully 2019-10-11 23:55:25 UTC
I just tried another upgrade from jmeter 4.0 to 5.1.1 after receiving an email from this thread that this bug had been fixed.

I am still unable to revert to jmeter 4 subresource naming, even with `subresults.disable_renaming=true` set in both my jmeter,properties and user.properties files.

Why was this closed and why is not possible to have this behavior?

Can someone please explain why this new behavior is acceptable/preferred?

Many thanks!
Comment 15 Philippe Mouawad 2019-10-12 06:02:52 UTC
Hello,
It is fixed in nightly and future 5.2 not 5.1.1

Can you try with this please

https://dist.apache.org/repos/dist/dev/jmeter/apache-jmeter-5.2-rc2/

Thanks
Comment 16 Brian Tully 2019-10-14 14:12:57 UTC
Thanks again, Philippe! Sorry I misunderstood that it would be fixed in 5.1. I have tested apache-jmeter-5.2-rc2 and the `subresults.disable_renaming=true` property is working as expected :)

Cheers,
Brian