New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 62887. Customized SampleLabel is ignored and overwritten by JMet… #429
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #429 +/- ##
===========================================
+ Coverage 58.59% 58.6% +<.01%
- Complexity 10632 10637 +5
===========================================
Files 1196 1196
Lines 76051 76072 +21
Branches 7357 7357
===========================================
+ Hits 44562 44579 +17
- Misses 28981 28984 +3
- Partials 2508 2509 +1
Continue to review full report at Codecov.
|
@@ -2,16 +2,16 @@ | |||
<testResults version="1.2"> | |||
<sample s="true" lb="ComputeIPAddr" rc="200" rm="OK" dt="text"/> | |||
<httpSample s="true" lb="HTTP-Request-HC31" rc="200" rm="OK" dt="text"> | |||
<httpSample s="true" lb="HTTP-Request-HC31-0" rc="200" rm="OK" dt="text"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this test result is modified.
The result should be numbered sub results no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the bug I understand, that JMeter will change subResults labels only if this labels are equals.
The parent label is HTTP-Request-HC31
, subResults labels start with http://jmeter.apache.org/.....
They are not equals and JMeter does not change them.
@@ -10,7 +10,7 @@ | |||
<queryString class="java.lang.String"></queryString> | |||
<java.net.URL>file:testfiles/HTMLParserTestFile_2.html</java.net.URL> | |||
</httpSample> | |||
<httpSample s="true" lb="file:testfiles/HTMLParserTestFile_2.html-1" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" de="" by="1321" sc="1" ec="0" ng="1" na="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here
@@ -10,7 +10,7 @@ | |||
<queryString class="java.lang.String"></queryString> | |||
<java.net.URL>file:testfiles/HTMLParserTestFile_2.html</java.net.URL> | |||
</httpSample> | |||
<httpSample s="true" lb="file:testfiles/HTMLParserTestFile_2.html-1" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" de="" by="1321" sc="1" ec="0" ng="1" na="1"> | |||
<httpSample s="true" lb="file:testfiles/HTMLParserTestFile_2_files/style.css" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" de="" by="1321" sc="1" ec="0" ng="1" na="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here
@@ -144,7 +144,7 @@ | |||
<httpSample s="true" lb="HR-FollowRedirect-18" rc="302" dt="text"/> | |||
<httpSample s="true" lb="HR-FollowRedirect-19" rc="302" dt="text"/> | |||
<httpSample s="true" lb="HR-FollowRedirect-20" rc="302" dt="text"/> | |||
<httpSample s="false" lb="HR-FollowRedirect-21" rc="Non HTTP response code: java.io.IOException" dt="text"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this modification. Why 20 instead of 21 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you expect HR-FollowRedirect-21
here we can fix it using this small hack:
if (redirect >= MAX_REDIRECTS) {
lastRes = errorResult(new IOException("Exceeded maximum number of redirects: " + MAX_REDIRECTS), new HTTPSampleResult(lastRes));
lastRes.setSampleLabel(totalRes.getSampleLabel()); // use parent label
totalRes.addSubResult(lastRes);
}
@@ -120,7 +120,7 @@ | |||
<httpSample s="true" lb="HR-FollowRedirect-18" rc="302" dt="text"/> | |||
<httpSample s="true" lb="HR-FollowRedirect-19" rc="302" dt="text"/> | |||
<httpSample s="true" lb="HR-FollowRedirect-20" rc="302" dt="text"/> | |||
<httpSample s="false" lb="HR-FollowRedirect-21" rc="Non HTTP response code: java.io.IOException" dt="text"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here
Thanks Artem for the PR, but I don't understand it. |
Hi @artem-fedorov, Thanks |
@pmouawad
|
Hello @artem-fedorov , |
Hello @artem-fedorov , There seem to be a place for this PR amended for users that use JMeter for functional testing as per the 2 last comments in: Would you be ready to amend your PR to have old behaviour only if:
Thanks |
Hello @pmouawad |
…losing issue. This closes apache#429 Bugzilla Id: 62887 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1849497 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 7f4da0e
…er 5.0