Skip to content

Running Asssertions Using Activity Mode

Sujata edited this page Nov 12, 2019 · 1 revision

Running "Activity" Assertions in BusinessWorks

Introduction

This document provides instructions to run Assertions by selecting "Activity" from Assertion Mode drop down in BusinessWorks 6.6 with BW Maven Plugin 2.4.0. The Activity Assertion feature provides the capability to test complete activity output.

Pre-requisites

• BW 6.6.0

• Maven: https://maven.apache.org/download.cgi

• BusinessWorks Maven Plugin 2.4.0 – https://github.com/TIBCOSoftware/bw6-plugin-maven/releases

Adding Activity Assertions

This section assumes you have already added the "Test" file for the sub-process which you want to test. Please refer "Adding Unit Tests Assertions" section from https://github.com/TIBCOSoftware/bw6-plugin-maven/wiki/UnitTesting to add test file.

  1. Right click on the Activity from the subprocess and Click on "Add Test -> Add Assertion" option. This will add the "Test" tab

  2. Open the "Tests" tab. You will see Assertion Mode drop down which will have the "Primitive" and "Activity" mode options. Using "Primitive" mode user can test only the Primitive type elements.To add primitive mode please refer https://github.com/TIBCOSoftware/bw6-plugin-maven/wiki/UnitTesting. Using "Activity" mode User will be able to test the complete activity output which could be a complex schema.

  1. Select "Activity" option from "Assertion Mode" drop down, the complete activity output schema will get loaded with editable values field Under Assert Type node. Map Activity variable from "datasource" section (In Image you can see it's Mapper) to "activityTestInput" field.

  1. Provide the gold input to all the elements of activity schema which is under the assert node.

Note : You don’t have to save the process after adding test inputs and assertions. Also If the schema having the fields with data type decimal, double, float then add the value in the decimal format for e.x 1.2 or 4.3234 likewise

  1. To run the test case please refer "Running the Unit Tests in Business Studio" from https://github.com/TIBCOSoftware/bw6-plugin-maven/wiki/UnitTesting
Clone this wiki locally