Unit Testing a Component in a Flow

As part of the flow development, test data needs to be provided for a component in a flow. After the test data is added, a component may have to be unit tested to make sure that the provided test data gets the flow working as expected.

To unit test a component that is part of a flow:

  1. Navigate to the Flows tab.
  2. Select and right-click the flow. Click Create/Update Flow Structure.
  3. On the Flow Definition page, navigate to the component. Right-click and select Edit Test Data.

    Alternatively, you can click the edit icon next to the component in the flow.

  4. On the Edit Test Data page, provide the web service name in the component's test data. Also, provide the operation name/transaction type in the appropriate component's test data field. Fill up all the test data for the component as necessary.
  5. Save the test data and click Close.
  6. On the Flow Definition page, click the Test Component icon Test Component document and magnifying-glass icon. next to the component name. Alternatively, you can right-click the component and select Test Component.

    This will open up the conversational test data entry screen for the component.

  7. Select the flow and user configuration needed to test the component. Click OK.
  8. Click Send to post the request to the application being tested. Clicking Send does not save the data into the test data of the component being tested.
  9. After receiving the response, validate it (for errors) to see if the test data provided is appropriate. Else, adjust the test data and click Send to send a new request to the application being tested.
  10. Repeat step 9 till the expected response is obtained.
  11. Once the appropriate test data is set and the response is as expected, click Save to save the updated test data into the component's test data in the flow.

Note:

Clicking Save will only replace any static values provided in the component's test data for a given element. If the Test Data field for a component line contains a global variable, the variable in the field will not be replaced by the static data in the request being saved.