Canoo and Groovy - how to use storeRegEx
We would like to test the following flow using Canoo. The tests are written in Groovy, and not as Ant tasks.
- Send a request to a specific URL (we use "invoke")
- Extract specific information from the response (we use "storeRegEx" with property:"ans")
- Print the extracted value (for debug purposes). println "${ans}" - does not work
- Use the extracted value in the next action (e.g. inv开发者_StackOverflowoke "new/url/id=#{ans}")
We saw some references to using an AntBuilder, it fails as well.
Is there some example for that flow? Thanksremember that it depends on the ant property type (dynamic or ant) whether you have to use #{ans}
or ${ans}
println will not work in webtests. Use the description property of webtest steps instead:
group(description:"#{ans}") {
...
}
this will show you the value of your property in the test result.
精彩评论