The code i have written for that is as folows:
try {
byte []
samplerdata = ctx.getPreviousResult().getResponseCode();
String
samplerdatastring = new String(samplerdata, "UFT-8");
vars.put("samplerdata", samplerdatastring);
vars.get(samplerdata);
int
matches = StringUtils.countMatches(samplerdata, "200");
vars.put("matchescount", String.valueOf(matches));
vars.get(matchescount);
} catch (Throwable
ex
)
{
log.error("Error in Beanshell", ex);
throw ex;
}
It results in an rror as follows:
jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``try { byte [] samplerdata = ctx.getPreviousResult().getResponseCode(); Stri . . . '' : TargetError
Can any one please help me to resolve this error.