Hello, In version 4.0 of JMeter this method was introduced: https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html#setIgnore-- The aim was to provide the ability to custom tester code (JSR Sampler, PostProcessor) to not emit the SampleResult to listeners. The current implementation is not be fully ok. Currently , due to this: https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L561 The SampleResult is not considered to decide on what to do: https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L586 Besides, currently this condition is useless so it will be fixed: https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L574 This should be changed as user usually wants to influence whether we switch to next iteration, stop thread, test. As a consequence, the enhancement will restrict this method to what its javadoc states: - Don't sent To avoid breaking existing code relying on it and because it looks correct, if ignore is set, we will not run: - Post Processor on it as it is not supposed to concern real request on which user would like to extract data from response - Assertion on it as it is not supposed to concern real request on which user would like to check some content Considering its use is for impacting algorithmic execution, it will be taken into account to: - Decide what to do on Error ("Action to be taken after a Sampler error" in Thread Group) - set JMeterThread.last_sample_ok
https://github.com/apache/jmeter/pull/604
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 77e80e8 Bug 64581 - Allow SampleResult#setIgnore to influence behaviour on (#604) 77e80e8 is described below commit 77e80e8a0c3d3ef6f408f6fefecc622a286b5ce5 Author: Philippe M <pmouawad@users.noreply.github.com> AuthorDate: Wed Jul 8 08:59:50 2020 +0200 Bug 64581 - Allow SampleResult#setIgnore to influence behaviour on (#604) Sampler Error Fix also misnamed lastSampleInError to lastSampleOk When SampleResult#isIgnore() is true, use is for impacting algorithmic execution, it will be taken into account to: - Decide what to do on Error ("Action to be taken after a Sampler error" in Thread Group) - set JMeterThread.last_sample_ok --- .../org/apache/jmeter/threads/JMeterThread.java | 60 +++++++++++++--------- xdocs/changes.xml | 1 + xdocs/usermanual/component_reference.xml | 7 +++ 3 files changed, 43 insertions(+), 25 deletions(-)
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5354