Previous Topic: File Watcher AssertionNext Topic: WS-I Basic Profile 1.1 Assertion


Check Content of Collection Object Assertion

The Check Content of Collection Object assertion lets you make simple assertions on the contents of a collection. This assertion is a useful way to find out if specific tokens are in the collection, with the option of adding some simple constraints. For example, if data that a bank web service returns includes an account list, this assertion can verify whether the account IDs match expected values.

Complete the following fields:

Name

Defines the name of the assertion.

If

Specifies the behavior of the assertion from the drop-down list.

then

Specifies the step to which to redirect if the assertion fires.

Log

Identifies event text to print if the assertion fires.

Property to Check (blank for whole response)

The name of the property holding the object that you want to use in the assertion. Leave this field blank to use the last response. The object must be of type Java Collection or Array.

Field to Check (blank for "toString")

Enter the name of a field and DevTest calls its get method.

Tokens To Find (value1, value2)

A comma-delimited string of tokens for which to check.

Exact Match Only

The token names much match exactly.

Must be in this order

Select this check box if the tokens must be found in the same order as in the Tokens To Find string.

Must only contain these tokens (no extra objects)

The tokens in the Tokens To Find string must be the only tokens found.

Click Run Assertion to execute the assertion.