Configure and manage the scenarios for a 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.
Test without starting Requests: Process Testing mocks Requests using mock Request data. Therefore, Process Testing does not trigger log events nor affect Save Search results.
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 process:
A Process Scenario contains the scope of a Process Test run using mock Request data. Create Scenarios from that Process's configuration, and then run them from the Process model in Process Modeler.
Process Testing can automate multiple runs against a series of test data in the Scenario. Tasks in each test automatically simulate completion using the mock Request data.
Scenarios can be created from current requests and test with real-time data.
ProcessMaker Platform displays all saved Scenarios for a Process. See What is Process Testing? for more information about how Scenarios work in Process Testing.
Follow these steps to view all Scenarios for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Test Run/ Scenarios tab. Testing Scenarios display.
The Scenarios tab displays the following information in tabular format for the selected Process:
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. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Modified: The Modified column displays the date and time the Scenario was last modified. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
ProcessMaker Platform displays all Process Tests for completed test runs.
Follow these steps to view all Tests for a Process:
Configure general settings for the Process. The Configuration tab displays.
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. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Completed: The Completed column displays the date and time the test was completed. The time zone setting to display the time is according to the ProcessMaker Platform instance unless your user profile's Time zone setting is specified.
Create Tests in a Process.
Follow these steps to create a Test Run for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Test Run/Scenarios tab to view scenarios for this process.
Click Test Run tab to view tests configured for this process.
Click the +Test button. The Run Test window displays.
From the Starting Point setting, select the Process model 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 not selected, the process will automatically flow and submit all tasks as follows:
Data from the Scenario setting will be used to auto-fill every input field or variable.
Expressions and validations also rely on the Scenario setting, which has the prefilled data model to drive evaluations.
Optionally, select a Scenario. See details on how to configure a Scenario.
Optionally from the Additional Data setting, add a JSON structure for the test. See details on how to provide additional data.
Select Bypass Scripts tasks and Data Connectors to skip running any script tasks or data connectors in the process.
Click Run to start the test. The test will run as configured and display relevant information in the run test summary.
Click Run. The test displays in the Test Runs tab.
If the test result is successful, it displays the following:
Highlighted decision path
Data model
Preview all form tasks
If the test result fails, and presents an error screen, the following displays:
Highlight why it failed such as a missing variable in an expression or a validation
Follow these steps to track tests for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Test Run/Scenarios tab, and then select the Test Run tab.
Click a test row. The Process test displays similarly when you are running a Request.
From the Form tab, complete Task Forms similarly to when running a Task.
From the Data tab, edit task data similarly to when running a Task.
From the Overview tab, track your test in a process map similar to when running a Request.
From the Emails tab, check email data during the test.
From the Summary section, check the summary test. There is just an option to cancel the test similar to when running a Request.
Follow these steps to search Tests created for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Test Run/Scenarios tab, and then select the Test Run tab.
Enter in the Search setting the text to filter tests.
As you enter text into the Search setting, tests display that match your entered text.
If there are no search results, the following message displays: No Results.
Create Scenarios in a Process.
Follow these guidelines to create a Scenario:
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.
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.
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.
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. 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, do one of the following:
Select Manual Data to enter JSON data for the scenario. Then, from the Data setting, enter the JSON data model for the Process Scenario that mocks the Request data during Process Testing.
Select Document Upload to create multiple scenarios simultaneously. This option requires a pre-formatted .xlsx
file. Click the Download Format button to download a sample file, then edit it to include your scenarios. Then, click the Upload button to upload the scenario file.
Click Save to save the scenarios.
Follow these steps to search Scenarios for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Scenarios tab. Testing scenarios display.
Enter in the Search setting the text to filter Scenarios.
As you enter text into the Search setting, Scenarios display that match your entered text.
If there are no search results, the following message displays: No Results.
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. This is a required setting.
From the Description setting, edit the Scenario description for the Process.
From the Data setting, edit the JSON data model for the Process Scenario that mocks the Request data during Process Testing.
Click Save.
Follow these steps to delete a Scenario for a Process:
Configure general settings for the Process. The Configuration tab displays.
Click the Scenarios tab. Testing Scenarios display.
Click Confirm.
Advantage | Disadvantage |
---|---|
Advantage | Disadvantage |
---|---|
Click the three dots icon, and then select the Delete option for the Scenario. The Caution window displays to confirm the deletion of the Scenario.
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
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