I get response from my request containing request id and if something goes wrong there is a err code.
I want to write a beanshell script that would look firstly if there is any err code, if not it would wirte request id into the csv file. I am not able to find anything about if else statements in beanshell
if (there is an err code){
write it to the csv file}
else {write request id to csv}
is it possible in beanshell or better to use assertions ?
Problem with java
2016/08/09 13:38:38 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.threads.JMeterContextService; import java.io.PrintWrite . . . '' : Command not found: regexMethod( java.lang.String, java.lang.String )
2016/08/09 13:38:38 WARN - jmeter.extractor.BeanShellPostProcessor: Problem in BeanShell script org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.threads.JMeterContextService; import java.io.PrintWrite . . . '' : Command not found: regexMethod( java.lang.String, java.lang.String )