Create bugs from schedules
To run a collection of test cases in one or more environments (machines, devices, etc.) on a scheduled basis or by triggering test cases through the Leapwork REST API, we must define a schedule. In a schedule, we can select one or more test cases from a Leapwork project and pair them with one or more environments. Furthermore, we can set the duration and frequency of scheduled test case runs.
In a schedule, we can select Add action and define one or more actions that should be performed during a test case. One example of an action is to send an e-mail when a schedule has ended. Another is to call a specified web service if more than X number of test cases in the schedule has failed.
In this case, a PowerShell action is triggered when the schedule is finished. This action is used to call a local PowerShell script and pass the result of the schedule to the PowerShell script. An example of how to specify this action is shown in the following figure:
The command tells Leapwork to run a PowerShell script, c:\scripts\createTFSbugs.ps1.
The following parameters have been added:
-result: This parameter is read by the PowerShell script and is the result of the entire schedule. To add the result data, right-click in the command field and select Insert token -> RESULTS-JSON.
-rootPath: This parameter is read by the PowerShell script and is the file path to the folder containing the videos and screenshots recorded during the execution of the test cases.
The PowerShell script, CreateTFSbugs.ps1, will connect to the Azure DevOps Server REST API and create or update bugs based on the failed test cases in the schedule.
If you have any questions, contact priority support on prioritysupport@leapwork.com.
Comments
0 comments
Please sign in to leave a comment.