RPA Testing is designed for testing workflows directly and viewing the activity coverage during execution. Such testing processes ensure that execution is performed and all corner cases are covered, regardless of the decisions taken during execution.
An RPA Testing file can be created by invoking a workflow from the project. Righ-click a workflow in the Project panel and select Create Test Case:
A test case
.xaml is created invoking the workflow and having three additional containers: Given, When, and Then. The file is invoked inside the Invoke Workflow File activity, part of the When container.
Arguments from the workflow are automatically imported. To view or add more arguments, click the Import Arguments button part of the Invoke Workflow File activity.
Depending on your testing needs, add activities inside the Test Case sequence, and Add Test Data if needed.
To check the workflow's activity coverage, debug the newly created test case. When performing this action in our example, we received the following coverage:
According to the message, this test case covered only 60% of the activities from the workflow. Depending on your automation needs, you can create separate test cases to cover each scenario during the execution. For example, the above flowchart uses a Flow Switch activity. We can then create another test case to follow the execution of another scenario, like in the case of low-volume loans.
Another way would be to create one test case to cover all the sections of the workflow. For our workflow, we decided to use a separate set of data to test out all activities. Therefore, we imported data from a
.csv file and used a For Each activity to pass it through each activity in the workflow:
When debugging, a 100% activity coverage rate was reached meaning that the data set used in the test case, together with the added activities covered all possible scenarios in the project.
Test cases are packaged only if they are Set as Publishable. In the Project panel, right-click a test case and select Set as Publishable. Read more about setting test cases as publishable here.
Publishing is performed by clicking the Publish or Publish Test Cases ribbon options:
- Publish - publishes the whole project together with test cases;
- Publish Test Cases - publishes the project as a test case to be managed from Orchestrator's Test Cases page.
Updated 18 days ago