Service verification point details

Verification points enable you to test the behavior of a service by checking the message return of a call against criteria. You can perform checks on the contents of the XML document of the message return, the number of nodes returned by an XPath query, or the existence of a specific attachment.

Contain and equal verification points

Contain verification points return a Pass status when the message return object contains the specified XML message. Equal verification points return a Pass status when the message return object matches the specified XML message.

The verification occurs if the message return object is a valid XML message. The verification is performed on both the name of the XML element and final return value of the element. Attributes are not checked.

Use the Form, Tree and Source views to edit the message content.

Enable verification point

When selected, the test verifies whether the Web service message return objects matches the expected criteria of the verification point. The verification point fails if the message return does not match the expected criteria.

Test using XML namespace

Perform the verification on a qualified structure, including the XML namespace, instead of the simple name.

For example, if the expected XML data is:

<ns1:responseElement xmlns:ns1="http://www.ibm.com/wbse"></ns1:responseElement>
When Namespace aware is enabled, the verification is made on the full name of the return value:

<ns1:responseElement xmlns:ns1="http://www.ibm.com/wbse"></ns1:responseElement>
When Namespace aware is disabled, the verification ignores the namespace tagging and checks only the simple name of the element and the final return value:

<ns1:responseElement xmlns:ns1="http://www.ibm.com/wbse"></ns1:responseElement>
In this case, you can simplify the value of the expected XML data to:

<responseElement><responseElement>

Test XML text nodes

Include XML text values in the verification.

Test XML attributes

Include XML attributes in the verification.

Form

This view provides an simple view of the elements of the call with their values. Use this view to quickly edit values in the form.

Tree

This view provides a hierarchical view of the elements of the call with their values, attributes, and the associated namespaces. You can use Add, Insert, Remove, Up, and Down to edit this list.

Click the namespace, attribute, or text filter buttons, depending on requirements.

Click Allow only valid modifications to enable smart editing, based on a specified XML schema document (XSD).

To specify a set of XSD documents for the workbench, in the test navigator, right-click the project and select Properties and Schema Catalog. Disable smart editing if you do not have an XSD or if to bypass the schema.

You can specify standard Java™ regular expressions. In the Regexp column, select the line of an attribute or text value and type the regular expression in the Value column. For example, the following regular expression checks for a correctly formatted email address: /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/

Source

This view displays the source XML document of the call.

The ID tags that are shown in the Source page refer to an internal representation for the test. If you remove these tags, you will remove any existing references and substitutions. You cannot re-create these tags after you delete them.


Query verification points

Query verification points return a Pass status when the number of nodes returned by an XML Path language query matches the expected number of nodes specified in the verification point.

The verification occurs if the message return object is a valid XML document.

XPath expression

Specify a query using the XML path language. Refer to the XPath specification for details on expressing an XPath query: http://www.w3.org/TR/xpath. Click Build Expression to open the XPath Expression Builder window.

Because XPath expressions require that the qualified name has a prefix, XPath expressions will return null for the default namespace declared with xmlns.

Operator and Expected Count

These specify the expected number of nodes returned by the query.

Evaluate

Click this button to calculate the number of nodes based on the current input. This value automatically replaces the current Expected count.


Attachment verification points

Attachment verification points return a Pass status when the message return attachment matches all of the criteria specified in the verification point.

The verification occurs only if the message return object is a valid XML document.

Enable verification point

When selected, the test verifies whether the Web service message return objects match the expected criteria of the verification point. An error is reported in the test log if the message return does not match the expected criteria.

Index of the attachment to be verified

In the case of multiple attachments, this number specifies which attachment to check.

Attachment size

This specifies the expected size of the attachment.

MIME type

This specifies the expected MIME type of the attachment.

Encoding

This specifies the expected encoding of the attachment.


Related reference

  • Service test details
  • Service call details
  • XML call details
  • Service message return details
  • Service callback details
  • Service timeout details
  • Service parallel details
  • Service receive details