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 run groovy -D webtest.home="C:\CanooWebTest" test.groovy, I the
following message 

Caught: java.io.FileNotFoundException: webtest.home
(C:\Testing\webtest.home)

 

This is the sample groovy test given in the canoo website. Looks like
some problem with webtest.home.  Does anyone know why it fails?

 

Thanks

-Jai

Reply via email to