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