i

JMeter Complete Guide

Post-Processor

Post-Processor

BeanShell PostProcessor: A post-processor that is executed after the Sampler and can used for recovery or clean-up.
BeanShell Assertion: An BeanShell assertion with access to JMeter API. .
BeanShell Function: A JMeter Function that allows execution of custom BeanShell code during a sampler run.

Bean Shell Post-Processor Example: -
log.info(prev.getResponseCode());
log.info(prev.getResponseMessage());
String message = prev.getResponseMessage();
if(message=="OK")
{
    vars.put("RESULT","PASS");
    log.info("pass");}
    log.info(vars.get("Result"));
According to the above code if the Result is 200 OK then give the output as "pass."

Screenshot Of BeanShell PostProcessor: -