Re: Correlation Fails

Dmitri T <[email protected]> Tue, 23 Apr 2024 07:59:23 +0200
Newsgroups gmane.comp.jakarta.jmeter.user
Message-ID <PH7PR12MB71391E88582EBAEB2EDF66F5C0112@PH7PR12MB7139.namprd12.prod.outlook.com>
Sumit Kishore wrote:
> In Jmeter, requests after multiple retries are getting Response code
> 200/201, however its Regular expression extractor fails to capture value.
>
> And because of that the next request is failing because of correlation.
>
> And the same Extractor works if we get response code 200/201 in 1st Go.
> It's just that after multiple retries, even if the request is getting the
> correct response code, it's failing to extract the value.
>
> Regards,
> Sumit Kishore
>
It's not possible to provide a comprehensive answer without seeing your 
test plan structure and response body for these two cases. Consider the 
following:

 1. Be aware of JMeter Scoping Rules
    <https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules>,
    in order to apply the Regular Expression Extractor to a single
    Sampler you need to make it a child of this Sampler
 2. It is possible to execute the "next request" conditionally if you
    put it under the If Controller
    <https://www.blazemeter.com/blog/jmeter-if-controller> and use
    ${JMeterThread.last_sample_ok} pre-defined variable
    <https://jmeter.apache.org/usermanual/functions.html#predefinedvars>as
    the condition
 3. Compare response data for success on first iteration and success
    after several retries using View Results Tree
    <https://jmeter.apache.org/usermanual/component_reference.html#View_Results_Tree>
    listener, it might be the case that the system under test returns
    different responses under different scenarios