diff --git a/assets/images/hyperexecute/features/rerun/1.png b/assets/images/hyperexecute/features/rerun/1.png index b562331e..f07d0a32 100644 Binary files a/assets/images/hyperexecute/features/rerun/1.png and b/assets/images/hyperexecute/features/rerun/1.png differ diff --git a/assets/images/hyperexecute/features/rerun/2.png b/assets/images/hyperexecute/features/rerun/2.png index 96210404..dd81c05e 100644 Binary files a/assets/images/hyperexecute/features/rerun/2.png and b/assets/images/hyperexecute/features/rerun/2.png differ diff --git a/docs/hyperexecute-rerun-failed-tests.md b/docs/hyperexecute-rerun-failed-tests.md index e6b674e2..f9e9a367 100644 --- a/docs/hyperexecute-rerun-failed-tests.md +++ b/docs/hyperexecute-rerun-failed-tests.md @@ -3,16 +3,15 @@ id: hyperexecute-rerun-failed-tests title: Rerun Failed Tests on HyperExecute hide_title: false sidebar_label: Rerun Failed Tests -description: Optimize your workspace with HyperExecute job archiving to boost productivity. Keep only relevant jobs. Learn more! +description: Speed up debugging by rerunning only failed tests or entire jobs on HyperExecute using the rerun job feature. keywords: - LambdaTest Hyperexecute - LambdaTest Hyperexecute help - LambdaTest Hyperexecute documentation url: https://www.lambdatest.com/support/docs/hyperexecute-rerun-failed-tests/ site_name: LambdaTest -slug: hyperexecute-rerun-failed-tests/ +slug: hyperexecute-rerun-failed-tests/ --- - -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. +:::info BETA +The feature is currently in **BETA**. +::: + +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. + +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. + +## Prerequisites +To rerun a job, the following requirements must be fulfilled. + +- 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. +- Make sure you are using **YAML version 0.1** with auto-split mode and discovery mode as local only. -To address this, HyperExecute introduces Rerun Failed Tests, a feature that allows you to rerun only the failed tests or scenarios from a previous job, drastically reducing your feedback loop and helping you validate fixes faster. +> Support for YAML version 0.2 and other modes will be added soon. -## Why Use Rerun Failed Tests? -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’d need to rerun the entire job to verify the fix. With **Rerun Failed Tests**, you can now: -- Quickly identify failed tests via RCA (Root Cause Analysis). -- Apply your fix (in code or application). -- Rerun only failed tests from the same job, instead of re-running the entire suite. +:::note +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). + - 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. + - If your local repo has uncommitted changes (a “dirty” working tree), rerun will not work. Commit or stash your changes before running the job. +::: -This shortens your CI/CD cycle, saves compute time, and accelerates feedback. - +**View failed scenarios -> Identify the fix via AI RCA -> Apply your fix and deploy -> Rerun only failed scenarios of the job** -## How to Rerun Failed Tests +### Benefits +- **Faster feedback loop:** Rerun only what matters (failed scenarios), so you confirm fixes quickly instead of re-running the full suite. + - **Reproducible results:** Reruns always use the same YAML as the original job, even when you choose the latest commit, ensuring consistent environment settings. + - **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. +## Rerun Configuration Options +HyperExecute provides you flexibility to select different parameters while rerunning the job. +- **Failed or All Scenarios:** You can rerun only the failed scenarios or all scenarios of that job. +- **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. +- **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. -**Step 1 :** Go to the Jobs section in the HyperExecute Dashboard. +> If there are multiple test cases under a failed scenario, all those test cases will be rerun if the scenario is marked as failed. -**Step 2 :** Open the job you want to rerun. Click on the **Rerun** button +## How to Rerun a Job +**Step 1 :** Go to the **Jobs** section in the HyperExecute dashboard.
+**Step 2 :** Open the job you want to rerun and click the **Rerun** button in the top bar.
Image +

-**Step 3 :** Select the **Commit** whether you want to rerun with the same commit or with the latest one and select the Concurrency as well. Click on the **Rerun** button. +**Step 3 :** In the Rerun dialog: +- Select the **commit** you want to use (same commit as the original job or the latest commit from the repo). +- Optionally adjust the **concurrency** for the rerun. +Then click **Rerun** to start the new job. Image -HyperExecute will automatically trigger a new job referencing the same commit or sourcePayload. -## Benefits -- **Reduce feedback loop time :** no need to rerun full test suites. -- **Save resources :** run only what failed. -- **Simplify debugging :** rerun failed scenarios directly after applying fixes. -- **Integrates seamlessly :** works across Dashboard, CLI, and APIs. -- Supports same or latest commit reruns. \ No newline at end of file +> If you do not satisfy the mentioned conditions but still want to use the rerun job feature, please reach out to us at [support@lambdatest.com](mailto:support@lambdatest.com). We will be constantly evolving this feature and are looking forward to your feedback to make it better. \ No newline at end of file