Skip to content

Commit 2614da0

Browse files
authored
Merge pull request #2253 from surishubham/main
Stage PRs - 2230, 48
2 parents a4c80fc + 8d2cedc commit 2614da0

File tree

4 files changed

+93
-0
lines changed

4 files changed

+93
-0
lines changed
51.5 KB
Loading
98.1 KB
Loading
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
id: hyperexecute-rerun-failed-tests
3+
title: Rerun Failed Tests on HyperExecute
4+
hide_title: false
5+
sidebar_label: Rerun Failed Tests
6+
description: Speed up debugging by rerunning only failed tests or entire jobs on HyperExecute using the rerun job feature.
7+
keywords:
8+
- LambdaTest Hyperexecute
9+
- LambdaTest Hyperexecute help
10+
- LambdaTest Hyperexecute documentation
11+
url: https://www.lambdatest.com/support/docs/hyperexecute-rerun-failed-tests/
12+
site_name: LambdaTest
13+
slug: hyperexecute-rerun-failed-tests/
14+
---
15+
<script type="application/ld+json"
16+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
17+
"@context": "https://schema.org",
18+
"@type": "BreadcrumbList",
19+
"itemListElement": [{
20+
"@type": "ListItem",
21+
"position": 1,
22+
"name": "Home",
23+
"item": "https://www.lambdatest.com"
24+
},{
25+
"@type": "ListItem",
26+
"position": 2,
27+
"name": "Support",
28+
"item": "https://www.lambdatest.com/support/docs/"
29+
},{
30+
"@type": "ListItem",
31+
"position": 3,
32+
"name": "HyperExecute Concepts",
33+
"item": "https://www.lambdatest.com/support/docs/hyperexecute-rerun-failed-tests/"
34+
}]
35+
})
36+
}}
37+
></script>
38+
:::info BETA
39+
The feature is currently in **BETA**.
40+
:::
41+
42+
Debugging test failures often involves **identifying the root cause, fixing the issue, and rerunning tests to validate the fix**. However, in large test suites with hundreds or thousands of tests, rerunning the entire job consumes significant time and resources.
43+
44+
To address this, HyperExecute supports Rerun Job functionality, a feature that allows you to rerun only the failed scenarios or all the scenarios directly from the dashboard, drastically reducing your feedback loop and helping you validate the fixes faster.
45+
46+
## Prerequisites
47+
To rerun a job, the following requirements must be fulfilled.
48+
49+
- Your test suite should be available on **Git** (Github and Bitbucket are supported) and linked to a [Project](/support/docs/hyperexecute-projects). This is required because each time a job is rerun, HyperExecute needs access to your test suite.
50+
- Make sure you are using **YAML version 0.1** with auto-split mode and discovery mode as local only.
51+
52+
> Support for YAML version 0.2 and other modes will be added soon.
53+
54+
:::note
55+
You can use the rerun feature for jobs started from your **local machine as long as Git info is available** (i.e., you’re running tests from a cloned Git repo).
56+
- Make sure the project details are set in your job’s YAML, and the project is linked to the same Git repo you’re running from.
57+
- If your local repo has uncommitted changes (a “dirty” working tree), rerun will not work. Commit or stash your changes before running the job.
58+
:::
59+
60+
## Why Use Rerun Feature?
61+
Consider a scenario where you’ve executed 1000 tests in a single HyperExecute job, and 50 tests failed due to a bug, either in your test code, infrastructure, or application under test. Previously, you were bound to run the complete job again which would have taken a lot more time (as you would have run the passed tests too) to check if the previously failed tests are passing or not. With **Rerun Job Feature**, your whole process is streamlined as given below:
62+
63+
**View failed scenarios -> Identify the fix via AI RCA -> Apply your fix and deploy -> Rerun only failed scenarios of the job**
64+
65+
### Benefits
66+
- **Faster feedback loop:** Rerun only what matters (failed scenarios), so you confirm fixes quickly instead of re-running the full suite.
67+
- **Reproducible results:** Reruns always use the same YAML as the original job, even when you choose the latest commit, ensuring consistent environment settings.
68+
- **Better flaky test diagnosis:** By rerunning only the failed scenarios on the same configuration, it’s much easier to distinguish genuine regressions from flaky tests.
69+
## Rerun Configuration Options
70+
HyperExecute provides you flexibility to select different parameters while rerunning the job.
71+
- **Failed or All Scenarios:** You can rerun only the failed scenarios or all scenarios of that job.
72+
- **Using Same or Latest Commit:** You can reuse the same commit as the original job or the latest commit from your repository. This lets you rerun after fixing your test suite or application under test.
73+
- **Adjusting Concurrency:** The **YAML remains the same** for the rerun and the original job to maintain the same environment, but you can change the concurrency on which the rerun job will run.
74+
75+
> If there are multiple test cases under a failed scenario, all those test cases will be rerun if the scenario is marked as failed.
76+
77+
## How to Rerun a Job
78+
**Step 1 :** Go to the **Jobs** section in the HyperExecute dashboard. <br />
79+
**Step 2 :** Open the job you want to rerun and click the **Rerun** button in the top bar. <br />
80+
81+
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rerun/1.png').default} alt="Image" className="doc_img"/>
82+
<br /><br />
83+
84+
**Step 3 :** In the Rerun dialog:
85+
- Select the **commit** you want to use (same commit as the original job or the latest commit from the repo).
86+
- Optionally adjust the **concurrency** for the rerun.
87+
Then click **Rerun** to start the new job.
88+
89+
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rerun/2.png').default} alt="Image" className="doc_img"/>
90+
91+
92+
> If you do not satisfy the mentioned conditions but still want to use the rerun job feature, please reach out to us at [[email protected]](mailto:[email protected]). We will be constantly evolving this feature and are looking forward to your feedback to make it better.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ module.exports = {
201201
label: "Test Metrics",
202202
id: "hyperexecute-task-metrics",
203203
},
204+
"hyperexecute-rerun-failed-tests"
204205
],
205206
},
206207
{

0 commit comments

Comments
 (0)