requirements-testing-examples: Difference between revisions
Jump to navigation
Jump to search
MarkRickerby (talk | contribs) (moved test language examples to separate page) |
No edit summary |
||
Line 25: | Line 25: | ||
<pre> | <pre> | ||
<target name="login" > | <target name="login" > | ||
<webtest name="normal" > | <webtest name="normal" ></pre> | ||
</pre> |
Revision as of 01:22, 6 July 2007
Requirements Testing Examples
The XUnit framework approach to writing test cases is still the most common way of implementing automated tests, but there are already a number of examples of mini languages and formats for web testing:
Feed Parser Test Suite
The XML files from the Feed Parser Test Suite created by Mark Pilgrim are prefixed with a comment containing a description and expectation, decoupling the test assertions from imperative code:
<!-- Description: Atom namespace (official) Expect: bozo and feed['title'] == u'Example Atom' --> <!-- Description: entry contributor homepage Expect: bozo and entries[0]['contributors'][0]['url'] == u'http://example.com/' -->
Canoo WebTest
Canoo WebTest runs test steps defined in the Ant XML format:
<target name="login" > <webtest name="normal" >