jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Kenworthy <Stuart.Kenwor...@bjss.com>
Subject Re: Multiple Post-Processor execution order
Date Thu, 07 Sep 2017 06:42:13 GMT
I understand which is why I placed the preprocesssor outside the sampler. It should then be
run before all samplers processing data from the previous request.

However if they are only logging is there a specific reason they have to be in that order?

On 7 Sep 2017 02:00, Andrew Burton <andrewburtonatwh@gmail.com> wrote:
Thanks for the reply Stuart.

The intention of the having a Post-Processor outside the thread group is
that it will apply to all Samplers globally, i.e. for every sampler, log an
entry to an additional log file. Then, for the Sampler-specific
Post-Processor, extract one or more different fields from a JSON response,
so that they will be included in the log.

This way we can add additional context to the response time for each
request, i.e. we can capture the number of fields returned from a query, to
see how much of a correlation this has to response times, etc.Or whether
different input parameters included in a body request influence the
response time.

I suspect given the way the ordering is applied that the only way to do
this is to have a global Post-Processor for common sampler data, e.g. is
successful, duration, response code, etc. And add a log entry on *every
individual* Sampler to include Sampler-specific data. I was trying to avoid
having to include a log command for each Sampler, but that might be the
only way to do it in the meantime.

(The original question only included 1 sampler, that probably didn't help
my explanation, which was oriented around multiple different samplers).

On Wed, Sep 6, 2017 at 7:19 PM, Stuart Kenworthy <Stuart.Kenworthy@bjss.com>
wrote:

> Sorry missed out the regex
>
> + JSR223 Post Processor A
>
> + JSR223 Pre Processor C (was Post Processor C)
>
> + Sampler
> - + JSR223 Post Processor B
> - + Regular Expression Extractor
>
> -----Original Message-----
> From: Stuart Kenworthy [mailto:Stuart.Kenworthy@bjss.com]
> Sent: 06 September 2017 09:32
> To: JMeter Users List <user@jmeter.apache.org>
> Subject: RE: Multiple Post-Processor execution order
>
> So you would have
>
> + JSR223 Post Processor A
>
> + JSR223 Pre Processor C (was Post Processor C)
>
> + Sampler
>
> - + JSR223 Post Processor B
>
> - + Regular Expression Extractor
>
> Thanks
>
> -----Original Message-----
> From: Stuart Kenworthy
> Sent: 06 September 2017 09:30
> To: JMeter Users List <user@jmeter.apache.org>
> Subject: RE: Multiple Post-Processor execution order
>
> The problem you have is the 2 defined outside the sampler are read before
> the sampler is run so they will run first. The only true way to control it
> is to have them within the sampler.
>
> If you are just logging specific fields to file, grab the values using
> regex and then use a pre-processor instead so the logging is done before
> running the next sampler, if I understand your intentions correctly.
>
> -----Original Message-----
> From: Andrew Burton [mailto:andrewburtonatwh@gmail.com]
> Sent: 06 September 2017 03:36
> To: JMeter Users List <user@jmeter.apache.org>
> Subject: Multiple Post-Processor execution order
>
> Hi,
>
>
>
> Is there any way to control the execution order of post processors that
> apply globally vs. those that are sampler-specific?
>
>
>
> My use case is that I want to record sampler-specific MDC elements within
> a sampler’s post processor, and have a generic post processor that does the
> logging. E.g. Get the exact error message in the sampler’s post processor
> (and the response payload may differ from sampler to sampler, hence the
> need to have a sampler-specific post processor), and have a generic thread
> group post processor which logs a message if the request fails.
>
>
>
> For example, the tree would be:
>
>
>
> Thread Group
>
> +-JSR223 Post Processor A
>
> +-Sampler
>
>   +- JSR223 Post Processor B
>
> +- JSR223 Post Processor C
>
>
>
> The sequence order appears to be:
>
> Sampler
>
> Post Processor A
>
> Post Processor C
>
> Post Processor B
>
>
>
> If I add specific items to the MDC in Post Processor B, then with the
> above execution order, they won’t be available in A or C.
>
>
>
> Would be keen to hear from others who’ve used MDC for additional logging
> similar to this.
>
>
>
> Regards
>
>
>
> Andrew
>
> The information included in this email and any files transmitted with it
> may contain information that is confidential and it must not be used by, or
> its contents or attachments copied or disclosed to, persons other than the
> intended addressee. If you have received this email in error, please notify
> BJSS. In the absence of written agreement to the contrary BJSS' relevant
> standard terms of contract for any work to be undertaken will apply. Please
> carry out virus or such other checks as you consider appropriate in respect
> of this email. BJSS does not accept responsibility for any adverse effect
> upon your system or data in relation to this email or any files transmitted
> with it. BJSS Limited, a company registered in England and Wales (Company
> Number 2777575), VAT Registration Number 613295452, Registered Office
> Address, First Floor, Coronet House, Queen Street, Leeds, LS1 2TW.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
> The information included in this email and any files transmitted with it
> may contain information that is confidential and it must not be used by, or
> its contents or attachments copied or disclosed to, persons other than the
> intended addressee. If you have received this email in error, please notify
> BJSS. In the absence of written agreement to the contrary BJSS' relevant
> standard terms of contract for any work to be undertaken will apply. Please
> carry out virus or such other checks as you consider appropriate in respect
> of this email. BJSS does not accept responsibility for any adverse effect
> upon your system or data in relation to this email or any files transmitted
> with it. BJSS Limited, a company registered in England and Wales (Company
> Number 2777575), VAT Registration Number 613295452, Registered Office
> Address, First Floor, Coronet House, Queen Street, Leeds, LS1 2TW.
>


The information included in this email and any files transmitted with it may contain information
that is confidential and it must not be used by, or its contents or attachments copied or
disclosed to, persons other than the intended addressee. If you have received this email in
error, please notify BJSS. In the absence of written agreement to the contrary BJSS' relevant
standard terms of contract for any work to be undertaken will apply. Please carry out virus
or such other checks as you consider appropriate in respect of this email. BJSS does not accept
responsibility for any adverse effect upon your system or data in relation to this email or
any files transmitted with it. BJSS Limited, a company registered in England and Wales (Company
Number 2777575), VAT Registration Number 613295452, Registered Office Address, First Floor,
Coronet House, Queen Street, Leeds, LS1 2TW.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message