Create Scenarios in a Process.
Follow these guidelines to create a Scenario:
Create a scenario by providing a JSON data model containing variables and values 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.
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:
Run the test from Process Modeler. It is not necessary to select a Scenario.
Enter the specific JSON data model in the Additional Data setting.
Create a scenario using the request data from a completed request. The following table describes the advantages and disadvantages to this method.
Follow these steps to create a Scenario from a Request data:
Locate a Request summary or Task summary to verify that it contains the JSON data from which to create the Scenario.
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.
Click the Create Scenario button from that Request or Task summary. The Create Scenario screen displays from which to create the Scenario.
Follow these steps to create a Scenario for a Process:
Configure general settings for the Process in which you want to add a scenario. The Configuration tab displays.
Click the Test Run/Scenarios tab. Testing scenarios display.
Click the +Scenario button to create a new scenario.
From the Name setting, enter the Scenario name for the Process. This is a required setting.
From the Description setting, enter the Scenario description for the Process.
From the Scenario Creation Type setting, select Manual Data to enter JSON data for the scenario, and enter the data in the Data setting. The entered data must be a variable : value
pair that matches the JSON data model for this process.
From the Scenario Creation Type setting, select Document Upload to create multiple scenarios simultaneously. For the detailed procedure, see Create Scenarios in Bulk.
Click the Upload button to upload the scenario file.
Click Save to save the scenarios.
Create multiple scenarios at once using the bulk . This option requires a pre-formatted .xlsx file, where each row represents a scenario for a Purchase Order request.
Download a sample bulk scenario file.
Follow these steps to create bulk scenarios:
Configure general settings for the Process in which you want to add a scenario. The Configuration tab displays.
Click the Test Run/Scenarios tab. The Scenarios tab displays.
Click the +Scenario button to create a new scenario.
From the Name setting, enter the Scenario name for the Process. This is a required setting.
From the Description setting, enter the Scenario description for the Process.
From the Scenario Creation Type setting, select Document Upload to create multiple scenarios simultaneously.
Click the Download Format button to download a sample file, then edit it to include your scenarios. An example file ( PurchaseOrder.xlsx ) can also be downloaded at the beginning of this section.
Click the Upload File button to upload the bulk scenario file.
Click Save to save the scenarios. Each row from the uploaded file will be imported as a new scenario.
Follow these steps to edit a Scenario for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Scenarios tab. Testing scenarios display.
Click the three dots icon, and then select the Edit Scenario option for the Scenario to edit. The Edit Scenario window displays.
Edit the following if necessary:
From the Name setting, edit the scenario name for the Process.
From the Description setting, edit the Scenario description for the Process.
From the Data setting, edit the JSON data model for the Process Scenario.
Click Save.
Click Confirm.
Test a process before publishing it.
Follow these steps to test a Process:
Click the +Test button. The Run Test window displays.
From the Starting Point setting, select the modeling object from where to start the test.
Optionally, select Manual Resume Point to stop automated testing at the selected step and continue the test manually.
If a Manual Resume Point is selected, all steps from that point onward must be completed manually.
Users must manually fill in all screens. Data types of controls and screen validations will be checked.
If a Manual Resume Point is not selected, the process will automatically flow and submit all tasks.
If a Manual Resume Point is not selected, data from the selected scenario or Additional Data setting will be used to auto-fill input fields in screens or request variables.
The same data will also be utilized to evaluate gateway conditions and route the workflow accordingly.
If no scenario is selected or the Additional Data setting is empty, all tasks will be automatically submitted without any data or conditions. In this case, screen validation rules will not be checked.
Select Bypass Scripts tasks and Data Connectors to skip running any script tasks or data connectors in the process.
As the test runs, each modeling object is highlighted in a color to indicate its status.
Green: This indicates that the task has been completed. Hover over the task to view its details.
Blue: This indicates that the task is currently active. If the Manual Resume option was selected, click the task to open the form and submit it. Otherwise, wait for the task to be completed automatically.
Gray: This indicates that the task is pending or was not executed.
Red: This indicates an error. Hover over the step to review the error.
Follow these steps to cancel a Test run:
Hover over a task in an in-progress test.
From the task details, click the test number. For example, test #160
to view the currently active task.
Click the Cancel button in Task summary pane on the right.
A Caution screen displays to confirm the cancellation of the test run.
Click Confirm to cancel the test.
Follow these steps to track tests for a Process:
Click the Test Run/Scenarios tab, and then select the Test Run tab.
Click on a test to view its details.
From the Overview tab, view an in-flight process map.
From the Emails tab, check email data during the test.
The summary panel on right displays details of the test request and provides an option to cancel the test.
Advantage | Disadvantage |
---|---|
Advantage | Disadvantage |
---|---|
date | price | product | quantity | percentage | form_checkbox_1 |
---|---|---|---|---|---|
To delete a Scenario, click the three dots icon again, and then select the Delete option. The Caution window displays to confirm the deletion of the Scenario.
See the permissions or ask your Administrator for assistance.
Click the menu, and then select the Run Test option.
From the Scenario setting, optionally select a scenario. .
Optionally in the Additional Data setting, add JSON data for the test. You can enter JSON data manually or obtain it from the .
Click Run to start the test. The test will run as configured and .
A complete summary of all test runs can also be viewed in the .
After , Process Modeler simulates workflow routing based on the provided Scenario and/or JSON data.
Use the controls at the bottom of the Modeler to Run, Rerun, or Stop a test.
. The Configuration tab displays.
From the Form tab, view or complete .
From the Data tab, .
Do not need a Scenario to run a test
Requires JSON knowledge to either build the JSON data model or copy from Request data
Need only the specific mock Request data from which to test
Does not require JSON knowledge
Requires completed requests to use in the scenario
No need to build the JSON data model
Scenario may not contain exactly the mock Request data to test, so editing the Scenario may be required
04-30-2024
12
item11
6
9.8
true
04-28-2024
8
item12
14
3.2
true
05-01-2024
32
item13
3
10.5
false
05-03-2024
40
item14
4
20
true
05-02-2024
5
item15
35
15
false
Run a Process Test using a configured scenario that tests workflow using mock Request data without affecting production instances or logs of that Process.
Test your processes easily and safely before publishing to ensure proper functionality. The process testing feature provides the following benefits:
Automate testing: Eliminate manual, repetitive testing and automate multiple tests runs against a series of test data. Tasks in each test are completed automatically and validation requirements within Screens for Form Task are ignored.
Reduce time to delivery: Greatly accelerate the time to design and deliver sophisticated, complex Processes to production.
Increase the quality of solution delivery: Automate multiple test runs with different sets of test data. Rapidly evaluate, identify, and debug specific behaviors in the business solution.
Specify the scope of the Process Test: You have the flexibility to either run processes from start to finish, or begin and conclude testing from a midway point, based on your specific testing requirements.
Test runs of a process do not count towards application counters and metrics. This ensures that your testing activities won't skew or impact the data you rely on for system analytics.
Running a Process Test is a two step procedure:
A Process Scenario defines the scope of the test using mock Request data. Process Testing can run multiple tests using these scenarios, and tasks are automatically completed using the mock data
Scenarios can be created manually or by using request data from completed requests.
Follow these steps to view all Scenarios for a Process:
Click the Test Run/Scenarios tab to view Testing Scenarios.
The Scenarios tab displays the following information:
Name: The Name column displays the Scenario name for the Process.
Description: The Description column displays the Scenario description.
Created: The Created column displays the date and time the Scenario was created.
Follow these steps to view all Tests for a Process:
Click the Test Run/Scenarios tab, and then select the Test Run tab.
The Test Run tab displays the following information in tabular format for the selected Process:
Test #: The Test # column displays the test number.
Status: The Status column displays if the test is active, canceled, or completed.
Created: The Created column displays the date and time when the test was created.
Test without starting Requests: Process Testing mocks Requests using mock . Therefore, Process Testing does not trigger log events nor affect Save Search results.
to use for the test.
.
See the permissions or ask your Administrator for assistance.
.
. The Configuration tab displays.
Modified: The Modified column displays the date and time the Scenario was last modified. Note: All time zone setting are according to the ProcessMaker Platform instance or your Time zone setting.
See the permissions or ask your Administrator for assistance.
.
. The Configuration tab displays.
Completed: The Completed column displays the date and time the test was completed. Note: All time zone setting are according to the ProcessMaker Platform instance or your Time zone setting.