Create a test script

You can create a test script and add test data for each node and steps to execute the nodes.

You can create a test case on the latest version of a process (saved or released) . You cannot create a test case on the invalid process map. For example, if the end node is missing, the link between nodes is missing, or if rule configuration is not valid.

  1. Navigate to Workflow menu and create the item (process/case definition/ fragment/business rule/custom service) or open an existing item for which to create/view the test plan.
  2. Click the File tab and then click Test plan.
  3. Click New test script.

    A new browser tab opens and the following details are displayed. when you open an existing process:

    • Type and Name of the process appear as read-only.

    • Initialization data: This tab displays process initialization variables with the default values.

    • Case data: This tab displays the variables, states and events for a case fragment. This tab appears only when you create a test case on a case fragment.

    • Server data: This tab displays all the server variables with their current values.

    You can edit the initialization data and server variables values and the modified values are used during test execution. You cannot update values of initialization variables, case variables and server variables during test execution.

    If you modify the initialization data, click Restart test on the toolbar. The test starts again with modified values.

    For a document or folder variable, the File upload control is displayed for uploading the documents. The initialization values are saved for future test execution for capture document and folder initialization. The uploaded document(s) are saved as customer asset. These assets cannot be viewed from the Designer.
  4. In the Test name box, enter a unique name for the test case.
  5. Optional. Enter a Description for the test case.
  6. By default, the name of the resource who is the job creator or owner is displayed. You can change the job owner by selecting a different individual on the Job creator list.

    When you execute the test, the activity assigned to the job creator/job owner is executed accordingly and the resource name is displayed as job owner.

  7. Click Start.

    A job is created on the process. The test case viewer where you can configure the test script by adding test data for each node and adding steps to execute the nodes. Any changes are automatically saved. A toolbar appears using which you can add steps to the script for actions in the toolbar. When you make any change via the toolbar, the changes are recorded in the test script.

    A dialog box appears with the following two tabs:

    • Execution path: On this tab, you can add steps to execute the test case and add assertion. See Add execution steps and Add assertion.

    • Test data: This tab displays the initialization data and activity configuration such as node name. See Configure test data.

  8. Click Start.

    A job is created on the process and the following are displayed:

    • The test case viewer where you can configure the test script by adding test data for each node and adding steps to execute the nodes. Any changes are automatically saved.

    • A toolbar using which you can add steps to the script for actions in the toolbar. When you make any change via the toolbar, the changes are recorded in the test script.

    • A dialog box appears with the following two tabs:

      • Execution path: On this tab, you can add steps to execute the test case and add assertion. See Add execution steps and Add assertion.

      • Test data: This tab displays the initialization data and activity configuration such as node name. See Configure test data.

  9. Click Close to go to test cases list.
  10. Click Refresh.

    The test case name appears as hyperlink and the following columns are displayed: Name, description, last modified by and last modified date of test case. When you click the test case name hyperlink, the test case opens in a new browser tab.

Test case viewer toolbar

Use the following toolbar actions to add steps to the script.

Show Job History

Displays the history of a job.

Show variables

Displays all the variables. You can update the variable value as needed. Upon changing the variable value, an execute step is added under Steps/Assertions.

Show States

Displays the Change State dialog box to update the state. Upon changing the state, an execute step is added under Steps/Assertions.

Show Events

Displays the Raise Events dialog box with the events added. You can raise the event. Upon raising an event, an execute step is added under Steps/Assertions.

Information

Displays the summary of the job.

Re-evaluate Skin

Opens the Re-evaluate Skin dialog box where you can update variable values and live activities.

Expected Finish Time

Opens the Edit Expected Finish Time dialog box that displays the expected finish time (date, hours, minutes and/or seconds to complete the job. You can update the expected finish time, if needed.

Resources

Opens the Edit Floating Role Resources dialog box that displays the list of floating roles.

Process Design Notes

Opens the Add Process Design Notes dialog box where you can add notes for your process.

Zoom Slider

Zoom in or out the process map.

Overview

Displays the overview.

Orientation

Displays the map in vertical orientation.

Legend

Displays the color legend.

Refresh

Refreshes the page.

View Previous

Displays the previous process map.

Add case state and events

When you create or modify a test case for a case fragment, you can provide the following:

  • A single state associated with case as case job state.

  • Select case events and specify count for each event.

  1. Navigate to Workflow menu and create the case fragment or open an existing item for which to create/view the test plan.
  2. Click the File tab and then click Test plan.

    The list of test scripts are displayed.

  3. Click the test script link to open.

    The test script for the case fragment opens in a new browser tab and the following details are displayed:.

    • Type and Name of the process appear as read-only.

    • Enter the Case ref ID, such as TotalAgility1.

    • Initialization data: This tab displays process initialization variables with the default values.

    • Case data: This tab displays the variables, states and events for a case fragment. This tab appears only when you create a test case on a case fragment.

    • Server data: This tab displays all the server variables with their current values.

  4. The states and events that are created in the case definition are listed on the State and Event drop-down list. To add the states and events to the case fragment, on the Case data tab, do the following:
    1. Under State, on the State list, select a state.
    2. Under Event, on the Event list, select an event and click Add.

      The event is added. You can specify the event count by incrementing the number.

    3. Add more events as needed.

      To delete an event, click for the event.

  5. Click Start.

    A job is created on the case fragment.