Skip to content

Unit Test

Unit Tests can be done for any Flow Step or Flow Action within a Factorial Flow The Unit Tests tab within a Factorial Flow provides records of all unit tests created and allows the user to create new unit tests as well. ^1ff5ae

Alt text

Unit tests on specific Flow Steps or Flow Actions can also be initiated by right-clicking on the respective Step/ Action and clicking on the Unit Test option in the context menu. ^ff81d3

Alt text

Run a New Unit Test

Below steps illustrate how one can start a unit test.

  1. Initiate a unit test from the Unit Test tab in the flow (see here) or from the context menu (see here) of a Flow Step or a Flow Action A drawer panel opens up.

    Alt text

  2. Within the drawer panel, fill out the following details. The unit test needs to be configured to execute for a record that can be filtered by a selection query.

    Field Description
    Name Will be auto-populated with the current time-stamp
    Environment The environment for the unit test
    Test Scope Choose the scope of the unit test, either Step or Action
    Step Choose the Step to be unit tested
    Action Choose the Action to be unit tested. (Only required if the chosen scope is Action)
    Test Record The records to be associated with the unit test. Choose from:
    1. Existing Record on the CRM
    2. Test Data Templete
    Select Columns Columns of the associated business object to be returned by the query
    Sort Column Column to sort the query results by
    Sort Order Order of sorting of the query results, whether ascending or descending
  3. After filling the above details, define the conditions of the selection query using the attributes from the underlying business object.

  4. Click on the Run Query button to execute the query and choose from any of the query results from the Select Record dropdown
  5. Click on the Run Unit Test button to run the unit test.

View Completed Unit Tests

Once a unit test has been run, its status can be viewed from the Unit Tests tab of the flow.

Alt text

Clicking on any of the unit tests opens a summary panel that provides the Execution Status and links to the unit test record and the execution details.

Alt text