This seems Groovy related, not specific to WebTest.
Looks like the Groovy parser reads offending chars in your source file.
Can you execute other plain groovy scripts when you edit them the same way
as your WebTest scipt?

What happens if you put the whole content of your script in /* */ comments?
What if you put
10.time {
    println 'WebTest rocks!'
}
just before that comment?

ciao
Dierk
  -----Original Message-----
  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jayasudha Selvaraj
  Sent: Donnerstag, 1. November 2007 18:59
  To: [email protected]
  Subject: [Webtest] exception in phase 'parsing' in source unit
'sampletest.groovy' charsetName


  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