Hi,

   I'm trying to run the sample groovy script and it fails. The script
is here

 

def ant = new AntBuilder()

def webtest_home = System.properties.'webtest.home'

ant.taskdef(resource:'webtest.taskdef'){
    classpath(){
           pathelement(location:"$webtest_home/lib")
           fileset(dir:"$webtest_home/lib", includes:"**/*.jar")
    }
}


def config_map = [:]
['protocol','host','port','basepath','resultfile',
'resultpath', 'summary', 'saveresponse','defaultpropertytype'].each{
    config_map[it] = System.properties['webtest.'+it]
}

ant.testSpec(name:'groovy: Test Groovy Scripting at creation time'){
    config(config_map)
    steps(){
        invoke(url:'linkpage.html')
        for (i in 1..10){
            verifyText(description:"verify number ${i} is on pages",
text:"${i}")
        }
    }
}

 

When I use this command to run C:\Testing>groovy
-cp"C:/canoowebtest/lib" sampletest.groovy, it showed up this error

Caught: BUG! exception in phase 'parsing' in source unit
'sampletest.groovy' charsetName

 

I couldn't make out what it means? Can anyone help me please?

 

Thanks

-Jai

 

Reply via email to