Marc Guillemot wrote:
Which assertions would you make using AntUnit? What would it bring compared
to the WebTest verify steps?

I don't have a very specific example in mind it just intuitively
seems to be a good fit.

It is probably on par with verify steps but with a few nice twists:

<au:assertEquals> has a casesensitive attribute

<au:assertPropertySet> could check whether a failOnError
property was set or not

<au:assertFileExists> and <au:assertFileDoesntExist>
could check that various files we are expecting to be created
have been created

<au:assertFilesMatch> and <au:assertFilesDiffer>
could potentially replace <compareToExpected> in
simple cases

<au:assertLogContains> and <au:assertLogDoesntContain>
could check that those pesky warning messages regarding
redirects don't appear in the log from httpclient! ;-)

Just being able to do:

<au:assertTrue message="something exciting">
 <!-- some condition -->
</au:assertTrue>

Where some condition might be any of:

<condition property="isMacOsButNotMacOsX">
 <and>
   <os family="mac"/>
   <not>
     <os family="unix"/>
   </not>
 </and>
</condition>

<isfileselected file="a.xml">
 <date datetime="06/28/2000 2:02 pm" when="equal"/>
</isfileselected>

<length string=" foo " trim="true" length="3"/>

seems useful to me.

I guess we can do all these things using groovy but
antunit might be more accessible to some users of webtest.
And I suspect that antunit will be extended over time.

Anyway, this is all early days since this is ant 1.7 as far as
I know.

Cheers, Paul.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to