I can only think of adding a JSR223 PostProcessor
<https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PostProcessor>
and putting the following code to "Script" area:
where *prev* stands for SampleResult
<https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html>class
instance, see the JavaDoc for all available fields and functions and Top
8 JMeter Java Classes You Should Be Using with Groovy
<https://www.blazemeter.com/blog/top-8-jmeter-java-classes-you-should-be-using-with-groovy>
guide for more information on this and other JMeter API
<https://jmeter.apache.org/api/index.html> shorthands available for the
JSR223 Test Elements.
If you place the JSR223 PostProcessor at the same level as your
"Transactions" or a level above it will be applied to all of them, see
Scoping Rules
<https://jmeter.apache.org/usermanual/test_plan.html#scoping_rules> user
manual chapter for more details.
On 6/29/2022 12:35 PM, Riji K wrote:
Hi,
I was asked by an interviewer that "How do you change the status codes to
200 for failed transactions?" (Note: Had answered we can open the log file
and change the status code).
is there a way to do that??
Thanks in Advance
Regards,
Riji K