hi, To understand if the HTTP response contains an error message, i apply a regex that extract the error message (if there is) I added (as Http request child) a BeanShell Listener with code below the scope is set successufull false if credenziali != ret the NOOOOOOOOO or SIIIIIIIIIII are printed correctly , this mean the if condition is OK, but the status is always true. ************************************************************ String credenziali = vars.get("credenziali"); String ret = vars.get("return"); if (credenziali != ret){ print("NOOOOOOOOOOOOO"); resultSample.setSuccessful(false); (or SampleResult.setSuccessful(false);) }else{ print("SIIIIIIIIIIIIIIIIIIIIIIII");
} ************************************************************ thanks Fulvio sebb <[EMAIL PROTECTED]> ha scritto: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Sampler Read the para starting: When the script completes, control is returned to the Sampler, and it copies the contents of the following script variables into the corresponding variables in the SampleResult: On 21/02/2008, Fulvio Guglielmelli wrote: > How is possible set the successfull (true or false) using beanshell? > ctx.???? > > thanks > Fulvio > > > > --------------------------------- > > > --------------------------------- > L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------- --------------------------------- L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail