Develop an automated mechanism to identify failed test cases in test manager , select the required cases, and trigger their re-execution in automated way. how to do this . if any youtube reference kindly send link .
you can use test manager api
<testmanagerurl>/swagger/index.html
test execution apis will give the last test status, then create test case or start execution will help in restarting. check the swagger for full list of apis
cheers
do you have any video reference for this ?
Hi @poojaskyrathore ,
Yes, this can be automated using UiPath Test Manager APIs + Orchestrator APIs.
Try this Approach
- Get test results from Test Manager using API.
- Filter failed test cases (Status = Failed).
- Select the test cases that need re-execution.
- Create a Test Set dynamically (or update an existing one).
- Trigger the Test Set execution through the Orchestrator/Test Manager API.
- Generate and send a summary email/report.
Alternative
If your test cases are already grouped in a Test Set, you can:
- Fetch the last execution results.
- Extract only failed test cases.
- Create a new “Re-run Failed Tests” Test Set.
- Trigger it automatically via API or a scheduled UiPath process.
Thanks
Use UiPath Test Manager + UiPath CLI:
- Get the latest test execution results.
- Filter the Failed test cases.
- Select the required failed cases.
- Trigger re-execution automatically using UiPath CLI.
- Repeat if needed, with a maximum retry count.
Flow:
Test Execution → Get Failed Cases → Filter → Re-execute → Check Result
Official reference: UiPath – Re-executing test executions
Hi @poojaskyrathore,
The simplest approach is to use the Execution Template to run the test cases and add a retry mechanism within the Run Test Case block. This will automatically retry the test case in case of a System Exception, so you don’t need to manually identify and re-trigger the failed test cases.
Alternatively, you can select the failed test cases in Test Manager and re-execute the cases.
A more advanced approach would be to create an agent that monitors test executions, analyzes the execution logs, and decides whether a failed test case should be retried or reported.
Thanks!
I dont think anyone made a video..but its merely a two api call you need to do..swagger should help you build api
Cheers
@Anil_G i have less knowledge on API . could you tell me step by step appraoch on how to do that ?
Hi @poojaskyrathore,
You can follow these steps below to achieve this:
- Get API access to Test Manager
- Test Manager exposes a Swagger UI at
https://<your-testmanager-url>/swagger/index.html. Log in to Test Manager in another tab so Swagger inherits the session. This lets you try calls and see exact request/response shapes before building the workflow. - For Automation Cloud, register an External Application (Admin → API Access) to get a Client ID/Secret, then get a bearer token via OAuth client-credentials flow.
- Identify the endpoints you need (via Swagger, under the Execution/Test Set Execution controllers):
GETa test set execution → returns the list of test case executions with theiroutcome/statusfield.POSTre-execute (the same call the UI’s “Execute” button on selected checkboxes fires); takes an array of test case execution IDs.
- Build the UiPath workflow
- Use HTTP Request activities with the bearer token in the Authorization header.
- Call the “get test set execution” endpoint → deserialize JSON → LINQ filter where
outcome = "Failed"→ collect the execution IDs into a list. - Call the re-execute endpoint, Posting that ID list in the body.
- Wrap with retries/timeout since automated executions can take time to complete (poll the status endpoint until Passed/Failed/Cancelled).
- Trigger it automatically
- Publish the workflow as a process, create it in Orchestrator, and attach a Time Trigger (e.g., run 30 min after your nightly test set execution), or
- Call it from your CI/CD pipeline as a post-test step (Test Manager’s CI/CD integration exposes the execution ID you just need).
If you do not have any knowledge on API’s then you can refer to this youtube video.
Cheers!
you need to use two apis, 1 get testexecutions which will give you failed and passed test cases.
then which ever is failed you need to rerun using another api which is post testexecution
swaggers has exact details
cheers

