csvjmeterresponsebeanshellpost-processor

JMeter: How to provide condition in Beanshell post processor just to log successful/failed signup


Scenario is: 1000 users signup at same time.

Now, if the response message in "View results in a Tree" is "1", its successful registration, But if response message "3", its failed request.

I would like to know how can I handle this in Beanshell Post processor.

OR

Is it possible to have csv with result of all registration?


Solution

  • Something like:

    String response = new String(data);
    
    if (response.equals("3")) {
        prev.setSuccessful(false);
    }
    

    Where:

    More information - How to Use BeanShell: JMeter's Favorite Built-in Component


    NB: It will be much faster and easier to go for Response Assertion instead of the Beanshell PostProcessor