1

We would like to test the following flow using Canoo. The tests are written in Groovy, and not as Ant tasks.

  1. Send a request to a specific URL (we use "invoke")
  2. Extract specific information from the response (we use "storeRegEx" with property:"ans")
  3. Print the extracted value (for debug purposes). println "${ans}" - does not work
  4. Use the extracted value in the next action (e.g. invoke "new/url/id=#{ans}")

We saw some references to using an AntBuilder, it fails as well.
Is there some example for that flow?
Thanks

user964797
  • 231
  • 3
  • 6
  • Independently of your test, make sure your regex actually works the way you think it does with the input URL. – mongiesama Dec 07 '11 at 22:26

1 Answers1

0

remember 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.

rdmueller
  • 10,742
  • 10
  • 69
  • 126