Create a Scenario for a Process

Create Scenarios in a Process.

Guidelines to Create a Scenario

Follow these guidelines to create a Scenario:

Provide Specific Mock Request Data to Test

A method by which to create a Scenario is to provide only the specific JSON data model that contains the Process model object(s) to test. A test need not begin from the Start-type element to start a Request. Therefore, mock Request data is necessary only from the Process model object from which to begin the test.

The following table describes the advantages and disadvantage to this method.

AdvantageDisadvantage

Do not need a Scenario to run a test

Requires to know JSON to either build the JSON data model or copy from Request data

Need only the specific mock Request data from which to test

Specify the specific JSON data model to test in one of the following ways:

  • Create a Scenario, and then enter the specific JSON data model in the Data setting.

  • Run the test:

    1. Run the test from Process Modeler. It is not necessary to select a Scenario.

    2. Enter the specific JSON data model in the Additional Data setting.

Create the Scenario from a Request's Data

A method by which to create a Scenario is from a Request's data. This method does not require to know JSON, the data structure for the data model from which to test, or to build the data.

The following table describes the advantages and disadvantages to this method.

AdvantageDisadvantage

Does not require knowing JSON

Requires running real Requests from which to create the Scenario, thereby triggering logging events and data available to Saved Searches

No need to build the JSON data model

Scenario contains the JSON data model only to the last triggered object in that Request, which may not contain

Scenario may not contain exactly the mock Request data to test, so editing the Scenario may be required

Follow these steps to create a Scenario from a Request data:

  1. Locate a Request summary or Task summary to verify that it contains the JSON data from which to create the Scenario.

  2. Evaluate the following about the Request's data under consideration:

    • The Request's workflow has proceeded to contain relevant data for the Process Test.

    • The values in that Request's data are those that you want for your Process Test. If not, then editing that Request's data may be necessary after creating the Scenario.

  3. Click the Create Scenario button from that Request or Task summary. The Create Scenario screen displays from which to create the Scenario.

Create a Scenario for a Process

Permissions Required

Your user account or group membership must have the following permissions to create Scenarios for a Process unless your user account has the Make this user a Super Admin setting selected:

  • Processes: Edit Processes

  • Processes: View Processes

See the Processes permissions or ask your Administrator for assistance.

Follow these steps to create a Scenario for a Process:

  1. Configure general settings for the Process. The Configuration tab displays.

  2. Click the Scenarios tab. Testing Scenarios display.

  3. Click the +Scenario button. The Create Scenario window displays.

  4. From the Name setting, enter the Scenario name for the Process. This is a required setting.

  5. From the Description setting, enter the Scenario description for the Process.

  6. From the Data setting, enter the JSON data model for the Process Scenario that mocks the Request data during Process Testing.

  7. Click Save.

pageWhat is a Scenario in Process Testing?pageView Scenarios for a ProcesspageSearch for a Scenario in a ProcesspageEdit a Scenario for a ProcesspageDelete a Scenario in a Process

Last updated

© Copyright 2000-2024 ProcessMaker Inc. All rights reserved.