Re: examples of tests in groovy

Murat <murat.knecht-gM/[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <CAN=M4EfrudXCOsQthrpNztOeKZyhexTDLMdO+3BO891na2hv=A@mail.gmail.com>
Hi!

1. In our groovy / xml Canoo-Test, we're using the following snippet
to configure and run tests. You'll notice that the structure is
identical to the XML-based tests.

		ant.testSpec(name:"${testInstance.class.simpleName}") {
			config(default_config)
			steps() {
				testInstance.invokeMethod(method.name, null)
			}
		}

default_config is a Map with the respective entries, host, protocol, ...

2. Entities: No idea. We don't use them anymore, as they don't scale well.
Macros: Use the AntBuilder to import the definitions file which in
turn imports the definitions files:

		ant.import (file: absolutePath("${getPathToCanooDir()}/definitions.xml"))

You can then use the macro definitions in your tests.

Regards,
Murat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.