Unit Test Framework : Adding Test Cases : Expected Output
Expected Output
The final step in defining a test case is to complete the Expected Output section. Expected Output can be in the form of data returned from the service or an exception returned from the service.
Use the class browser to define an exception or error output from the service. Click Browse to display the classes and select the proper exception class to use.
To define the data output from the service, use the following methods:
*Use XPath expressions to define which data elements in the output data should be evaluated.
1. Copy the XPath expressions from Software AG Designer. To copy the XPath expression, right click on the variable in the Results area when executing the service within and select Copy.
2. Click , , or and paste the copied value into the XPath field.
An entry for the variable selected is created. However, it in most cases it is not required to edit them as the webMethods paths are 0 index based whereas XPath expressions are 1 index based.
3. Enter the expected output for the field in the Value field.
You can select AND, OR, parentheses, and operators from the drop-down lists to create complex evaluations of the output.
*Use regular expressions to evaluate the output returned from the service. The regular expression should be placed in the Value field preceded and followed by "/" character.
Copyright © 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback