Running Activity Assertions using Gold Input from File
TIBCO BusinessWorks™ Container Edition
To run activity assertions in
TIBCO BusinessWorks Container Edition, follow these steps:
Procedure
Right-click on the activity from the subprocess and select
Add Test > Add Assertion.
This will add the
Test tab to the activity.
On the
Tests tab, navigate to the
Assertion Mode drop down.
The Assertion Mode drop down has two modes:
Primitive: In this mode, only the primitive types of elements are tested.
Activity: In this mode, the complete activity outputs are tested.
Select the
Activity option from
Assertion Mode drop down. The
Gold Input From File option is displayed. To add the gold values using the XML files select the
Gold Input From File check box or provide the gold values directly using the UI with editable values.
Select the
Gold Input From File option to provide the gold output through XML files. As shown in the image below, the
activityTestInput and
testFilePath fields are displayed. Map the activity variable from
datasource (Mapper as seen in the image) section to
activityTestInput field. In
testFilePath field, use the doc function from the URI function and provide the input file path in the format
file:///inputFilepath.
To create gold input file, run the activity for which you need to add the assertions. Copy the input JOB data from debug console using the
copy values option and paste in the XML file. Linarize the copied XML file. Change the input value with gold input values.
The created gold input file displays the following content