6.8 Assert Dialog

Use to assert a variable or a fault for a BPEL process.

Assertions enable you to validate a variable or a fault message in a BPEL process. Variable data assertions enable you to validate test data in a variable as a process is executed. This is done by extracting a value from a variable or an XML document and comparing it to an expected value.

Element Description

Activity Name

Click the Browse icon to specify the activity to assert. If you right-clicked a specific activity in test mode of Oracle BPEL Designer and selected Edit Activity Test Data, the name of the selected activity is already displayed.

Assert Variable

Select to create a variable assertion in the BPEL process.

Assert Fault

Select to create a fault assertion in the BPEL process.

Target

Select the target (for example, a payload).

Compare By (for value comparisons)

For value comparisons, you compare the payload variable directly with the value (for example, $inputVariable.payload/client:process/client:input).

String

Select to compare string values.

Pattern Match Using Java Regular Expressions

Select to compare a regular expression pattern (for example, [0-9]*). Java Development Kit (JDK) regular expression (regexp) constructs are supported. For example, entering a pattern of ab[0-9]*cd means that a value of ab123cd or ab456cd is correct. An asterisk (*) indicates any number of occurrences.

Number

Select to compare numeric values.

Value

Enter a value based on your selection in the Compare By list.

Compare By (for payload XML comparisons)

For payload XML comparisons, you compare the content of the XML document (for example, the payload content in $inputVariable).

XML Identical

Use when the comparison between the elements and attributes of the XML documents must be exact. If there is any difference between the two XML documents, the comparison fails. For example, the comparison fails if one document uses an element name of purchaseOrder, while the other uses an element name of invoice. The comparison also fails if the child attributes of two elements are the same, but the attributes are ordered differently in each element.

XML Similar

Use when the comparison must be similar in content, but does not need to exactly match. For example, the comparison succeeds if both use the same namespace Uniform Resource Identifier (URI), but have different namespace prefixes. The comparison also succeeds if both contain the same element with the same child attributes, but the attributes are ordered differently in each element.

In both of these examples, the differences are considered recoverable, and therefore similar.

Parts

Select a part (for example, a payload).

Enter Manually

Click to manually enter message data in the Enter Value field. The Generate Instance Sample icon enables you to automatically generate a sample file for testing. Click the Save As icon to save the sample file.

Load from File

Click to access the Browse icon for loading message data from a file. The file is added to the messages folder in the Application Navigator.

Description

Enter an optional description.

Related Topics

Automating Testing of SOA Composite Applications in Developing SOA Applications with Oracle SOA Suite