You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2020/03/04 14:30:06 UTC
[Bug 64196] New: Response Assertion do wrong when there are
sub-requests
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Bug ID: 64196
Summary: Response Assertion do wrong when there are
sub-requests
Product: JMeter
Version: 5.2.1
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: issues@jmeter.apache.org
Reporter: tanweiji@139.com
Target Milestone: JMETER_6.0.0
Response Assertion do wrong when there are sub-requests
I use a web server program "webtours" which is a part of loadrunner11.
the Home page of "webtours" contain some embedded resources(*.html & *.pl &
*.png),so the http samplers to this page can generate sub-samples.and some
sub-samples can also generate sub-sub-samples.
1.I make a HTTP main sampler to visit this web page
2.set the Attribute "Retrieve All Embedded Resources from HTML Files" in this
sampler to be "Yes".
3.I select a Response Assertion into this sampler.
4.set the Attribute "Apply to:" of Response Assertion to be "Main sample and
sub-samples"
5.I select a View Results Tree into the Thread Group.
I found three things that I think is wrong!
1.I fill a string which is Contained in the response of only one sub-request
into the Attribute “Patterns to Test”.I think the sampler will be successful
because I can find the string in the web page.But the real result is failure
because the string is not found in the responses of main sampler and other
sub-samplers. it won't be successful even if the string is found in the
response of one sub-sampler.
I think it is wrong! the result should be successful when the string is found
in the response of any sampler(including sub_sampler)
2. Response Assertion won't found the pattern strings in the sub-sub-samples.So
does the Regular Expression Extractor. The Attribute "Apply to:" is used for
Main sample and sub-samples,but does nothing to sub_sub_samples.Sometimes it
gets me in trouble.
3. Let's look into the View Results Tree,you will find there are some
sub_sampler and a main sampler under the main sampler.Yes, A duplicate main
sampler is under the main sampler.it does wrong sometimes! For example, the
Attribute "Apply to:" of Response Assertion is set to be "sub-samples only".
Fill a string which is Contained in all responses of sub-request(but no the
main_sampler) into the Attribute “Patterns to Test”. the real result is failure
because the string is not found in the duplicate main sampler. is it right? I
don't think so.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Wicky Tam <ta...@139.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #8 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37073
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37073&action=edit
Recurse deepr into subsamplers for assertion checks
I have not found a webpage, that would generate sub-sub-samplers for me, but I
think I know where the recursion has to happen. Would you be able to compile
JMeter with the attached patch for yourself?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk
Status|NEW |NEEDINFO
--- Comment #12 from Felix Schumacher <fe...@internetallee.de> ---
The fix has been committed. Could you please test the next nightly build?
commit 1a2f24ab25f2a571f7bcb599b4be692eb47dde92
AuthorDate: Sun Mar 8 15:26:25 2020 +0100
Recurse into sub samplers more deeply when checking assertions
With this change we recurse up to three levels into sub results of
SampleResults
instead of only one level deep.
This helps in case of parallel downloads of embedded elements of a web
page, which
get stored as sub-sub-sampleresults.
Bugzilla Id: 64196
---
.../org/apache/jmeter/threads/JMeterThread.java | 38 +++++++++++++---------
xdocs/changes.xml | 1 +
2 files changed, 24 insertions(+), 15 deletions(-)
commit 30a71a3112e436889d69ab9d2cb5403f4a3ab59c
AuthorDate: Sun Mar 8 16:58:35 2020 +0100
Recurse into sampleResults for getSampleList
With this change we collect the sampleList of a SampleReult by recursing up
to
three levels into sub results of SampleResults instead of only one level
deep.
This helps in case of parallel downloads of embedded elements of a web
page, which
get stored as sub-sub-sampleresults. Before this change a regex Post
Processor would
not see those sub-sub-sampleresults.
Bugzilla Id: 64196
---
.../jmeter/testelement/AbstractScopedTestElement.java | 19 ++++++++++++++++++-
xdocs/changes.xml | 1 +
2 files changed, 19 insertions(+), 1 deletion(-)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #14 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Wicky Tam from comment #13)
> I downloaded the nightly build Jmeter(LATEST
> (r1659-30a71a3112e436889d69ab9d2cb5403f4a3ab59c))and tested it.
>
> I find that regex extractor and Response Assertion can find the string in
> sub-sub-sampler in this version of jmeter.
>
> It solve the issue of point 2.
>
> what about other issues?
Maybe a thanks would be a good start .
For point 1, please open a separate enhancement request. AFAIK , it always
worked like this , I am not sure we can change behaviour, so we would add a new
option, this needs to be discussed
For point 3, please also open a separate bug and clarify how it differs from 1.
It's not clear for me.
Thank you in advance
>
>
> (In reply to Felix Schumacher from comment #12)
> > The fix has been committed. Could you please test the next nightly build?
> >
> > commit 1a2f24ab25f2a571f7bcb599b4be692eb47dde92
> > AuthorDate: Sun Mar 8 15:26:25 2020 +0100
> >
> > Recurse into sub samplers more deeply when checking assertions
> >
> > With this change we recurse up to three levels into sub results of
> > SampleResults
> > instead of only one level deep.
> >
> > This helps in case of parallel downloads of embedded elements of a web
> > page, which
> > get stored as sub-sub-sampleresults.
> >
> > Bugzilla Id: 64196
> > ---
> > .../org/apache/jmeter/threads/JMeterThread.java | 38
> > +++++++++++++---------
> > xdocs/changes.xml | 1 +
> > 2 files changed, 24 insertions(+), 15 deletions(-)
> >
> > commit 30a71a3112e436889d69ab9d2cb5403f4a3ab59c
> > AuthorDate: Sun Mar 8 16:58:35 2020 +0100
> >
> > Recurse into sampleResults for getSampleList
> >
> > With this change we collect the sampleList of a SampleReult by recursing
> > up to
> > three levels into sub results of SampleResults instead of only one level
> > deep.
> >
> > This helps in case of parallel downloads of embedded elements of a web
> > page, which
> > get stored as sub-sub-sampleresults. Before this change a regex Post
> > Processor would
> > not see those sub-sub-sampleresults.
> >
> > Bugzilla Id: 64196
> > ---
> > .../jmeter/testelement/AbstractScopedTestElement.java | 19
> > ++++++++++++++++++-
> > xdocs/changes.xml | 1 +
> > 2 files changed, 19 insertions(+), 1 deletion(-)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #2 from Wicky Tam <ta...@139.com> ---
Created attachment 37069
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37069&action=edit
the jmeter script
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #10 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37075
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37075&action=edit
Recurse into sampleResults to construct getSampleList
This will recurse deeper into sub sub samples to get sample lists to be used by
regex extractor (for example).
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Wicky Tam <ta...@139.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #13 from Wicky Tam <ta...@139.com> ---
I downloaded the nightly build Jmeter(LATEST
(r1659-30a71a3112e436889d69ab9d2cb5403f4a3ab59c))and tested it.
I find that regex extractor and Response Assertion can find the string in
sub-sub-sampler in this version of jmeter.
It solve the issue of point 2.
what about other issues?
(In reply to Felix Schumacher from comment #12)
> The fix has been committed. Could you please test the next nightly build?
>
> commit 1a2f24ab25f2a571f7bcb599b4be692eb47dde92
> AuthorDate: Sun Mar 8 15:26:25 2020 +0100
>
> Recurse into sub samplers more deeply when checking assertions
>
> With this change we recurse up to three levels into sub results of
> SampleResults
> instead of only one level deep.
>
> This helps in case of parallel downloads of embedded elements of a web
> page, which
> get stored as sub-sub-sampleresults.
>
> Bugzilla Id: 64196
> ---
> .../org/apache/jmeter/threads/JMeterThread.java | 38
> +++++++++++++---------
> xdocs/changes.xml | 1 +
> 2 files changed, 24 insertions(+), 15 deletions(-)
>
> commit 30a71a3112e436889d69ab9d2cb5403f4a3ab59c
> AuthorDate: Sun Mar 8 16:58:35 2020 +0100
>
> Recurse into sampleResults for getSampleList
>
> With this change we collect the sampleList of a SampleReult by recursing
> up to
> three levels into sub results of SampleResults instead of only one level
> deep.
>
> This helps in case of parallel downloads of embedded elements of a web
> page, which
> get stored as sub-sub-sampleresults. Before this change a regex Post
> Processor would
> not see those sub-sub-sampleresults.
>
> Bugzilla Id: 64196
> ---
> .../jmeter/testelement/AbstractScopedTestElement.java | 19
> ++++++++++++++++++-
> xdocs/changes.xml | 1 +
> 2 files changed, 19 insertions(+), 1 deletion(-)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #4 from Wicky Tam <ta...@139.com> ---
Created attachment 37071
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37071&action=edit
result tree
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #9 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37074
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37074&action=edit
Test plan to show that sub-sub-samples are not considered by assertions
The attached plan is adapted from the originally submitted plan. It uses a demo
site, that is currently online and can be used for testing.
It checks, that there is no "file: test1\d.css" found in any of the samples
(including sub-samples). If the patch is applied and JMeter recurses into
sub-sub-samples, the test plan fails (as intended).
So one of the two aspects of this bug should be fixed with the patch.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
CC| |p.mouawad@ubik-ingenierie.c
| |om
--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello
Could you clarify points 2 and 3 with examples and screenshots showing problems
?
Also it would be better to create 1 issue per item .
Thanks
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Felix Schumacher <fe...@internetallee.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Wicky Tam <ta...@139.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #6 from Wicky Tam <ta...@139.com> ---
attachment 37069/37070/37071 is for point 2.attachment 37072 is for point 3.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Recurse into sub samplers more deeply when checking
assertions
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS|Linux |All
Summary|Response Assertion do wrong |Recurse into sub samplers
|when there are sub-requests |more deeply when checking
| |assertions
Hardware|PC |All
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #3 from Wicky Tam <ta...@139.com> ---
Created attachment 37070
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37070&action=edit
the date captured by wireshark
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #5 from Wicky Tam <ta...@139.com> ---
Created attachment 37072
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37072&action=edit
script & screenshot for point 3
based on the script of point 2,but change the regular expressions of Response
Assertion to be “(?i)/body”。this regular expressions can match in sub_sampler
and not in main sampler.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #11 from Wicky Tam <ta...@139.com> ---
Due to the failure of patching with the “patch” command, I manually modified
the source code of the program according to the patch file you gave me.
and I tried my best to compile JMeter, but I failed.Because I'm not good at
programming,so I can't do anything now.
so could u please help me to compile or do anther thing to solve the
problem?Thanks!
(In reply to Felix Schumacher from comment #8)
> Created attachment 37073 [details]
> Recurse deepr into subsamplers for assertion checks
>
> I have not found a webpage, that would generate sub-sub-samplers for me, but
> I think I know where the recursion has to happen. Would you be able to
> compile JMeter with the attached patch for yourself?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
Wicky Tam <ta...@139.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEEDINFO |RESOLVED
--- Comment #15 from Wicky Tam <ta...@139.com> ---
Thanks for your support!
ok, I'll submit 2 bugs.!
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 64196] Response Assertion do wrong when there are sub-requests
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64196
--- Comment #7 from Wicky Tam <ta...@139.com> ---
Thanks for your reply. It's the first time that I use this system to submit the
bug. I will create 1 issue per item.
(In reply to Philippe Mouawad from comment #1)
> Hello
>
> Could you clarify points 2 and 3 with examples and screenshots showing
> problems ?
>
> Also it would be better to create 1 issue per item .
>
> Thanks
--
You are receiving this mail because:
You are the assignee for the bug.