[Webtest] Groovy Step (XML/Groovy)

Pfau, Matthias Pfau, Matthias" <map@zuehlke.com
Fri, 25 Jul 2008 16:56:39 +0200


Hi,
after a few hours I finally gave up. I simply do not understand why one
testcase works as XML and not as Groovy-Code. The XML looks like:
	<?xml version=3D"1.0"?>
=09
	<!DOCTYPE project SYSTEM "../dtd/Project.dtd">
=09
	<project default=3D"test">
	 <target name=3D"test">
=09
	  <webtest name=3D"check the groovy evaluation">
	    <groovy>
			print 'methods of step:'
			print step.class.methods.name   =20
	    </groovy>
	  </webtest>
=09
	 </target>
	</project>

The Groovy-Code looks like:
	import com.canoo.webtest.WebtestCase
=09
	class SimpleTest extends WebtestCase {
	  void testWebtestOnGoogle() {
	    webtest("check Groovy evaluation") {
		    groovy {
				print 'methods of step:'
				print step.class.methods.name
		    }
	    }
	  }
	}

Exception:=20
=09
testWebtestOnGoogle(SimpleTest)groovy.lang.MissingPropertyException: No
such property: step for class: SimpleTest

I tested against the latest build. Any ideas what went wrong?

Kind Regards
Matthias