L'analyse de la chaîne en entier en BeanShell Sampler dans JMeter

Je suis en train d'analyser une chaîne de caractères en entier dans JMeter mais a échoué en raison d'erreur suivant. Si j'essaie d'imprimer les chaînes de caractères retournée par vars.obtenir, ils ont l'air bien.

2014/06/28 00:08:52 WARN  - jmeter.assertions.BeanShellAssertion: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval  Sourced file: inline evaluation of: ``if (ResponseCode != null && ResponseCode.equals ("200") == false ) {  int i = In . . . '' : Typed variable declaration : Method Invocation Integer.parseInt 

Voici mon code

if (ResponseCode != null && ResponseCode.equals ("200") == false )
{
    int i = Integer.parseInt(vars.get("currentPMCount"));
    int j = Integer.parseInt(vars.get("pmViolationMaxCount"));
    if( i > j ){
        log.warn("PM count on server is greater than max allowed count.");
        }

        log.warn( "The return code is " + ResponseCode); //this goes to the JMeter log file
} 
else 
{
    Failure=true ;
    FailureMessage = "The response data size was not as expected" ;   
}

OriginalL'auteur TechCrunch | 2014-06-28