Test Cases
Test cases are stored in an XML document: Nodetest.xml.
There is a DataSet element in the file that contains data to be
used by test cases. Each test in the file contains:
- MethodName: The web method to be tested
- Description: A short description of the test
- Input: A set of input parameters for the test
- Rule: A set of error detection rules.
- Output: Output values that can be used in the subsequent
test.
The following is an example of a test case for the Ping method:
<Test>
<MethodName>Ping</MethodName>
<Description>This tests the hello message</Description>
<input>
<param name="Hello">There</param>
</input>
<rules>
<!-- out put validation rules using XPath -->
<rule var="//return/text()" op="exist">Hello method failed</rule>
</rules>
</Test>
|