You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2021/11/25 17:02:22 UTC

Re: Implementing Apply to scoping rules to JSR223 PostProcessor, JSR223 Assertion and JSR223 Listener elements

Hi Nikola,

currently those elements are not scopeable, as they are not inheriting
from the "correct" base class.

I think it would be possible to correct that by adding a new interface
AbstractScopedTestElement/Assertion and using the new interface to
decide, if an element is scopeable.

Best to open an enhancement issue on bugzilla.

Thanks

 Felix

Am 15.10.21 um 14:10 schrieb Nikola Aleksic:
> Hello,
>
> Does anyone know how can we set scoping for JSR223 PostProcessor,
> JSR223 Assertion and JSR223 Listener elements?
>
> Let say we have a test plan like in the attachment. The actual result
> in Thread Group 1 is following:
>
> 1. "JSR223 PostProcessor - addSubResult" adds subsample to every
> JSR223 Sampler, ignoring Transaction Controllers which is fine.
> =============================
> 2. "JSR223 PostProcessor - rename label" renames label only to JSR223
> Sampler, not able to apply scoping to the subsample of JSR223 Sampler
> as well. Is it possible to rename the label of the Transaction controller?
> =============================
> 3. "JSR223 Assertion" seems to apply check on Sampler and Transaction
> Controllers but skips subsample of JSR223 Sampler. I would like to
> skip check on Transaction controllers and include check only for
> Samplers, so if we have set "Main sample and sub-samples" to check
> main sample and sub-samples, skipping Transaction Controllers. Is it
> possible to do that?
>
> The actual result in Thread Group 2 is following:
>
> 4. "JSR223 Listener - addSubResult" adds subsample to last JSR223
> Sampler 2 only. I would like to apply the creation of a subsample to
> every JSR223 Sampler in the test.
>
> =============================
>
> It would be nice to be able to apply scoping rules to JSR223
> PostProcessor, JSR223 Assertion, and JSR223 Listener elements using
> code (if doesn't exist) and by selecting radio buttons as we have in
> other PostProcessors extractors, Assertions. For example Response
> assertion has a "Main sample and sub-samples", "Main sample only",
> "Sub-samples only", "JMeter variable Name to use" (not sure if this is
> required for JSR223 elements).
>
> Maybe to consider adding radio buttons named "Include Transaction
> controllers", "Include Transaction controllers only" and "Skip
> Transaction controllers"? I'm not sure if we are able to access
> Transaction controllers, rename labels, read response times etc.
>
> I skipped JSR223 PreProcessor - maybe there is a need to include it in
> scoping, not sure.
>
> What do you think about these findings and suggestions? Which ones are
> feasible to implement, which ones are not or unnecessary and why? If I
> missed anything to mention regarding this, feel free to give your
> opinion. Thank you!
>
> P.S. I used "subResult.setSampleLabel("Set subsample name")" in JSR223
> PostProcessor and Listener to set subsample label, but it doesn't
> work. What I'm doing wrong? I'm using JMeter 5.5-SNAPSHOT 462aaeb and
> Java 15.0.1.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org

Re: Implementing Apply to scoping rules to JSR223 PostProcessor, JSR223 Assertion and JSR223 Listener elements

Posted by Nikola Aleksic <na...@gmail.com>.
Hi Felix,

Sorry for the late reply. Enhancement has been opened here
<https://bz.apache.org/bugzilla/show_bug.cgi?id=65795>.

On Thu, 25 Nov 2021 at 18:02, Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Hi Nikola,
>
> currently those elements are not scopeable, as they are not inheriting
> from the "correct" base class.
>
> I think it would be possible to correct that by adding a new interface
> AbstractScopedTestElement/Assertion and using the new interface to decide,
> if an element is scopeable.
>
> Best to open an enhancement issue on bugzilla.
>
> Thanks
>
>  Felix
> Am 15.10.21 um 14:10 schrieb Nikola Aleksic:
>
> Hello,
>
> Does anyone know how can we set scoping for JSR223 PostProcessor, JSR223
> Assertion and JSR223 Listener elements?
>
> Let say we have a test plan like in the attachment. The actual result in
> Thread Group 1 is following:
>
> 1. "JSR223 PostProcessor - addSubResult" adds subsample to every JSR223
> Sampler, ignoring Transaction Controllers which is fine.
> =============================
> 2. "JSR223 PostProcessor - rename label" renames label only to JSR223
> Sampler, not able to apply scoping to the subsample of JSR223 Sampler as
> well. Is it possible to rename the label of the Transaction controller?
> =============================
> 3. "JSR223 Assertion" seems to apply check on Sampler and Transaction
> Controllers but skips subsample of JSR223 Sampler. I would like to skip
> check on Transaction controllers and include check only for Samplers, so if
> we have set "Main sample and sub-samples" to check main sample and
> sub-samples, skipping Transaction Controllers. Is it possible to do that?
>
> The actual result in Thread Group 2 is following:
>
> 4. "JSR223 Listener - addSubResult" adds subsample to last JSR223 Sampler
> 2 only. I would like to apply the creation of a subsample to every JSR223
> Sampler in the test.
>
> =============================
>
> It would be nice to be able to apply scoping rules to JSR223
> PostProcessor, JSR223 Assertion, and JSR223 Listener elements using code
> (if doesn't exist) and by selecting radio buttons as we have in other
> PostProcessors extractors, Assertions. For example Response assertion has a
> "Main sample and sub-samples", "Main sample only", "Sub-samples only",
> "JMeter variable Name to use" (not sure if this is required for JSR223
> elements).
>
> Maybe to consider adding radio buttons named "Include Transaction
> controllers", "Include Transaction controllers only" and "Skip Transaction
> controllers"? I'm not sure if we are able to access Transaction
> controllers, rename labels, read response times etc.
>
> I skipped JSR223 PreProcessor - maybe there is a need to include it in
> scoping, not sure.
>
> What do you think about these findings and suggestions? Which ones are
> feasible to implement, which ones are not or unnecessary and why? If I
> missed anything to mention regarding this, feel free to give your opinion.
> Thank you!
>
> P.S. I used "subResult.setSampleLabel("Set subsample name")" in JSR223
> PostProcessor and Listener to set subsample label, but it doesn't work.
> What I'm doing wrong? I'm using JMeter 5.5-SNAPSHOT 462aaeb and Java 15.0.1.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>