Designer 10.15 | webMethods Unit Test Framework Help | Adding Test Cases | Output Comparison
 
Output Comparison
Unit Test Framework allows you to select predefined or customize the output comparison to compare service results and check the destination table to confirm the operation executed successfully.
Note:
By default, the Output Comparison section appears on the webMethods Test Suite screen. To hide the section, go to Window > Preferences > Software AG > webMethods TestSuite > Advanced, and clear the Allow Comparator Configuration check box.
1. On the Output Comparison section, select Comparator Type.
2. Select one of the following options:
Select...
To...
Default
Compare the actual and expected service result without any filter.
Ignore Namespace Prefix
Ignore the namespace prefix from the service results.
For example, for a field value demotest:employee in the actual result, where demotest is the namespace prefix, Unit Test Framework ignores the namespace and uses employee for comparison.
Use Field Alias
Specify which fields in the service result should be compared.
You have to provide a field alias for the field in the actual result that you want to Unit Test Framework to compare against in the expected output.
For example, for a field value demotest:employee in the actual result, you can assign a 1002 as the field alias. Then, Unit Test Framework uses 1002 instead of demotest:employee for comparison.
Click to add the list of fields to compare.
Click , or to edit or delete the entries.
Custom
Specify a custom comparator for expected output other than provided with the plug-in.
Custom Service
Overrides the default comparator in webMethods Test Suite with an Integration Server service that has a custom assertion logic.
Field
Description
Comparator Service
Select an Integration Server service that implements the custom assertion logic for an output comparison. The service signature must conform to the wm.spec:result_comparator specification in the WmServiceMock package. You can import the specification directly into the service or replicate it manually in the Integration Server service. For more information on the specification, see WmServiceMock specification.
Implement the custom service to suit your testing requirements. If you select a custom service as the comparator, the outcome of the comparison between the actual and expected test results is determined by the assertion logic in the custom service chosen.
The custom service supports only the "file" type selected in the Expected Output section for comparison. However, providing a file is optional. If no file is selected, the comparator service receives "null" data for comparison.
Note:
If you define the expected outcome as XPath fields and Values, the comparator service ignores such "fields" during comparison.