Skip to content
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

SampleResult.setIgnore() called from PostProcessor is not considered #5461

Closed
asfimport opened this issue Dec 18, 2020 · 8 comments
Closed

Comments

@asfimport
Copy link
Collaborator

mspingher (Bug 65008):
Hello,

When using prev.setIgnore() in a JSR223 PostProcessor, it is not working as intended on JMeter 5.4 when attached under an HTTP Request sampler (doesn't matter if the HTTP Request sampler is inside a Transaction Controller). The HTTP Request sampler still shows up in View Results Tree and in the JMeter results file.

JMeter version - 5.4
Java version - 1.8.0_251
OS version - Windows 10 64-Bit (Build 19041)

Reproduction Steps -

  1. Add a JSR223 PostProcessor to an HTTP Request sampler, select Groovy 3.0.5 as the scripting language and in the script call prev.setIgnore().
  2. Switch to the View Results Tree and run the script.
  3. Verify if the HTTP Request sample appears in the View Results Tree.
  4. Open the JMeter results file and verify if an entry for that HTTP Request was written to the results file.

prev.setIgnore() works as intended on JMeter 4.0 r1823414.

OS: All

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Hello,
Can you please attach a simple test plan showing the issue ?

Thank you

@asfimport
Copy link
Collaborator Author

mspingher (migrated from Bugzilla):
Hi Philippe,

I've attached a sample test plan for you to be able to execute.

Once you run the script, you can see [MYAPI-000 - Some API] showing up in the View Results Tree as well as in the results CSV file even though the HTTP Request sampler has a JSR223 PostProcessor with prev.setIgnore().

Let me know if you need any more information!

Thank you,

  • MS

Created attachment prevSetIgnore.jmx: Sample test plan attached to verify and show the issue

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
Hello,
Thanks.
Issue was introduced by misinterpretation in #5354 of what seemed a useless code.

Should be fixed by:

9841a2a

Please test next nightly build and give your feedback.

Regards

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
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 9841a2a #5461 - SampleResult.setIgnore() called from PostProcessor is not considered
9841a2a is described below

commit 9841a2a
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Sat Dec 19 00:23:46 2020 +0100

https://github.com/apache/jmeter/issues/5461 - SampleResult.setIgnore() called from PostProcessor is not
considered

.../src/main/java/org/apache/jmeter/threads/JMeterThread.java | 9 ++++++---
xdocs/changes.xml | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)

@asfimport
Copy link
Collaborator Author

mspingher (migrated from Bugzilla):
Hi Philippe,

Thanks for looking into this so quickly and providing an update!
I'll test out the next nightly build and let you know the results.

Thank you again,
-MS (mspingher at visionpointsystems.com)

@asfimport
Copy link
Collaborator Author

mspingher (migrated from Bugzilla):
Hi Philippe,

I tested the nightly build JMeter 5.4.1-SNAPSHOT 9841a2a and it worked when you have an HTTP Request sampler by itself and not inside a Transaction Controller.

This may be a different issue but when you have that HTTP Request sampler that uses SamplerResult.setIgnore() inside a Transaction Controller with or without Generate Parent Sample checked, it will still show the Transaction Controller name in the View Results Tree as well as inside the JMeter results file.

On JMeter 4.0 r1823414, this does not happen as it will ignore the Transaction Controller name and the HTTP Request sampler from showing up in the View Results Tree and JMeter results file.

I've attached a screenshot to better explain what I mean, using the same sample test script I've previously attached.

Let me know if you need any more information!

Thank you,
-MS (mspingher at visionpointsystems.com)

Created attachment prevSetIgnore.jpg: Transaction controller name appears on View Results Tree and JMeter results file when using Sampler.setIgnore() in JSR23

Transaction controller name appears on View Results Tree and JMeter results file when using Sampler.setIgnore() in JSR23

@asfimport
Copy link
Collaborator Author

mspingher (migrated from Bugzilla):
Hi Philippe,

Any update on my last comment from 2020-12-19 23:02:07 UTC?

Should I create a new bug ticket entry for the SamplerResult.setIgnore() not working while there is a Transaction Controller on the parent level?

Thank you,
-MS (mspingher at visionpointsystems.com)

@asfimport
Copy link
Collaborator Author

@pmouawad (migrated from Bugzilla):
(In reply to mspingher from comment 7)

Hi Philippe,

Any update on my last comment from 2020-12-19 23:02:07 UTC?

Should I create a new bug ticket entry for the SamplerResult.setIgnore() not
working while there is a Transaction Controller on the parent level?

Thank you,
-MS (mspingher at visionpointsystems.com)

Hello,
Yes please create a new ticket.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant