Skip to content

Commit fd79976

Browse files
authored
Merge pull request #685 from Ishavyas9/main
HYP CLI doc revamped
2 parents 52092f8 + 2308f52 commit fd79976

37 files changed

+282
-539
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Loading
-91.3 KB
Binary file not shown.
-89.3 KB
Binary file not shown.

docs/ai-test-failure-analysis.md

+4-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: rca
3-
title: What is AI-Powered Test Failure Analysis in HyperExecute
4-
hide_title: true
3+
title: AI-Powered Test Failure Analysis in HyperExecute
4+
hide_title: false
55
sidebar_label: AI-Powered Root Cause Analysis
66
description: This documentation will help you leverage Root Cause Analysis and Error Classification features in HyperExecute to view different kinds of errors and directly land on corrective measures or fixes.
77
keywords:
@@ -36,41 +36,22 @@ slug: ai-powered-test-failure-analysis/
3636
}}
3737
></script>
3838

39-
# AI-Powered Test Failure Analysis in HyperExecute
40-
---
41-
4239
The AI-powered Root Cause Analysis (RCA) and Error Detection for HyperExecute testing helps you to quickly identify various error categories and offers a comprehensive overview of their underlying causes. It analyzes your test logs and identify the root cause of failures, so you can take corrective action quickly and efficiently.
4340

4441
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rca/rca_image.png').default} alt="Image" width="1347" height="616" className="doc_img"/>
4542

4643
## Why Test Failure Analysis?
4744

48-
Conventional test failure resolution demands manual analysis of logs and data sources, resulting in substantial delays. These inefficiencies hinder productivity and disrupt software development.
49-
50-
HyperExecute's AI-powered Test Failure Analysis seamlessly addresses these challenges, offering a proactive approach to identifying and fixing test case failures along with other benefits including:
45+
Conventional test failure resolution demands manual analysis of logs and data sources, resulting in substantial delays. These inefficiencies hinder productivity and disrupt software development. HyperExecute's AI-powered Test Failure Analysis seamlessly addresses these challenges, offering a proactive approach to identifying and fixing test case failures along with other benefits including:
5146

5247
- **Reduced time to identify and fix failures:** The AI-powered analysis can quickly identify the root cause of failures, so you can take corrective action quickly and efficiently. This can save you a significant amount of time, which can be used to focus on other tasks.
53-
5448
- **Improved accuracy of failure analysis:** The AI-powered analysis is more accurate than manual analysis, which can help you to identify and fix failures more effectively. This can lead to a higher quality product.
55-
5649
- **Increased productivity of testing teams:** The AI-powered analysis can free up testing teams to focus on other tasks, such as creating new test cases or debugging code. This can lead to a more efficient testing process.
5750

5851
## Generate the RCA of your failed Jobs
5952

6053
To use the AI-powered Test Failure Analysis feature, simply click on the Failure Analysis" (Beta) tab of your failed Job. Click on the **Generate RCA** Button. This usually takes around 20-30 seconds to generate the RCA.
6154

62-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rca/rca.png').default} alt="Image" width="1347" height="616" className="doc_img"/>
63-
6455
After categorizing errors, we offer a structured approach to address each failure type. You can efficiently get to the precise corrective measures or **Remedies** recommended alng with **Additional suggestions** for the particular error. This targeted approach expedites the issue resolution process, eliminating unnecessary steps and optimizing efficiency.
6556

66-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rca/rca_2.png').default} alt="Image" width="1347" height="616" className="doc_img"/>
67-
68-
---
69-
70-
## Conclusion
71-
72-
The AI-powered Test Failure Analysis feature is a powerful tool that can help you to quickly and easily identify and fix test failures. It offers a number of benefits, including reduced time to identify and fix failures, improved accuracy of failure analysis, and increased productivity of testing teams. If you are looking for a way to improve your testing process, the AI-powered Test Failure Analysis feature is a great option.
73-
74-
75-
76-
57+
<img loading="lazy" src={require('../assets/images/hyperexecute/features/rca/rca.gif').default} alt="Image" width="1347" height="616" className="doc_img"/>

docs/hyperexecute-artifacts.md

+16-51
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: hyperexecute-artifacts
3-
title: HyperExecute Job Artifacts
4-
hide_title: true
3+
title: Job Artifacts
4+
hide_title: false
55
sidebar_label: HyperExecute Job Artifacts
66
description: Learn how to generate the Artifacts for your desired framework and seamlessly interact with artifacts through the HyperExecute UI.
77
keywords:
@@ -36,87 +36,52 @@ slug: hyperexecute-artifacts/
3636
})
3737
}}
3838
></script>
39-
40-
# Artifacts
41-
4239
Artifacts are files generated during test execution, including reports and logs. You can refer to these files for obtaining consolidated information about the executed test cases, and can seamlessly interact with artifacts through the HyperExecute UI.
4340

4441
Following the completion of a Job, these artifacts are automatically stored in the **artifacts folder**, distinguishing previous files into **old-artifacts** on subsequent runs while retaining the recent files in artifacts.
4542

46-
## Steps to Generate Artifacts
47-
43+
## Steps to Generate and Download Artifacts
4844
Follow the below mentioned steps to generate the Artifacts for your desired framework:
4945

5046
**Step 1:** Go to the HyperExecute YAML file
5147

5248
**Step 2:** Add the below mentioned parameters in the YAML file to generate the Artifacts
5349

54-
```bash
55-
uploadArtifacts:
56-
- name: #user defined name of the artifact
57-
path:
58-
- #path of the generated artifact
59-
- name: #user defined name of the artifact
60-
path:
61-
- #path of the generated artifact
62-
```
63-
64-
```bash
50+
```yaml
6551
uploadArtifacts:
66-
- name: Executed-Job-Artifacts
52+
- name: Executed-Job-Artifacts #user defined name of the artifact
6753
path:
68-
- src/test/index.html
54+
- src/test/index.html #path of the generated artifact
6955
- name: My-Job-Artifacts
7056
path:
7157
- src/collect/info.html
7258
```
59+
:::note
60+
- If you are generating multiple artifacts, then it is recommended to use this parameter, [`mergeArtifacts`](/support/docs/deep-dive-into-hyperexecute-yaml/#mergeartifacts) in your YAML, as it will zip all your Artifacts files while downloading from the dashboard.
7361

74-
> **Note:** If you are generating multiple artifacts, then it is recommended to use this parameter, `mergeArtifacts` in your YAML, as it will zip all your Artifacts files while downloading from the dashboard.
62+
- You can replace the Artifacts folder name value with any of the Matrix parameters value.
7563

76-
```bash
77-
mergeArtifacts: true
78-
uploadArtifacts:
79-
- name: SrcData
80-
path:
81-
- src/test/index.html
82-
```
83-
84-
**Step 3:** Now trigger your job and go to the [HyperExecute](https://hyperexecute.lambdatest.com/hyperexecute/jobs) dashboard.
85-
86-
**Step 4:** Click on any of the artifacts generated.
87-
88-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifact3.jpeg').default} alt="Image" className="doc_img"/>
89-
90-
Here is the sample artifact generated.
91-
92-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifact4.png').default} alt="Image" className="doc_img"/>
93-
94-
:::info
95-
You can replace the Artifacts folder name value with any of the Matrix parameters value.
96-
97-
```bash
64+
```yaml
9865
matrix:
9966
os: [win]
10067
browser: ["chrome-latest-1", "firefox-latest-2"]
10168
69+
mergeArtifacts: true
10270
uploadArtefacts:
10371
- name: $browser
10472
path:
10573
- allure-results/
10674
```
10775

10876
As shown in the above code, the artifacts folder generated will be named **chrome-latest-1** and **firefox-latest-2**
109-
11077
:::
11178

112-
## Download the Generated Artifacts
113-
114-
**Step 1:** Go to the [HyperExecute](https://hyperexecute.lambdatest.com/hyperexecute/jobs) portal and click on your Job.
79+
**Step 3:** Now trigger your job and go to the [HyperExecute](https://hyperexecute.lambdatest.com/hyperexecute/jobs) dashboard.
11580

116-
**Step 2:** Click on the **Artifacts** button in the upper right corner.
81+
**Step 4:** Click on any of the artifacts generated. You can also download the artifacts from the dashboard
11782

118-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifact1.png').default} alt="Image" className="doc_img"/>
83+
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifacts.gif').default} alt="Image" className="doc_img"/>
11984

120-
**Step 3:** Click on the **Download** icon to download your Job Artifacts.
85+
Here is the sample artifact generated.
12186

122-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifact2.png').default} alt="Image" className="doc_img"/>
87+
<img loading="lazy" src={require('../assets/images/hyperexecute/features/artifacts-reports/artifact4.png').default} alt="Image" className="doc_img"/>

docs/hyperexecute-auto-healing.md

+10-25
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ site_name: LambdaTest
1313
slug: hyperexecute-auto-healing/
1414
---
1515

16+
import CodeBlock from '@theme/CodeBlock';
17+
import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys";
18+
1619
<script type="application/ld+json"
1720
dangerouslySetInnerHTML={{ __html: JSON.stringify({
1821
"@context": "https://schema.org",
@@ -47,69 +50,51 @@ HyperExecute's Auto Healing feature helps you enhance the robustness of the test
4750

4851
**Step 1:** ​To еnablе thе Auto Hеaling fеaturе, you nееd to pass thе **`autoHеal: truе`** as a capability in your WеbDrivеr configuration.
4952

50-
```bash
53+
```yaml
5154
const capability = {
5255
"browserName": "Chrome",
53-
"browserVersion": "114.0",
5456
"LT:Options": {
5557
"platformName": "Windows 10",
56-
"project": "Untitled",
57-
"w3c": true,
58-
"plugin": "node_js-node_js",
5958
# highlight-next-line
6059
"autoHeal": true
6160
}
6261
}
6362
```
64-
6563
**Step 2:** Now, trigger your test on HyperExecute using the mentioned command. Please replace the placeholder values with your details.
6664

67-
```
68-
./hyperexecute --user <your_username> --key <your_access_key> --config <your_yaml_file_name>
69-
```
65+
<div className="lambdatest__codeblock">
66+
<CodeBlock className="language-bash">
67+
{`./hyperexecute --user ${ YOUR_LAMBDATEST_USERNAME()} --key ${ YOUR_LAMBDATEST_ACCESS_KEY()} --config YOUR_YAML_FILE `}
68+
</CodeBlock>
69+
</div>
7070

7171
**Step 3:** Now visit the HyperExecute Dashboard to check your triggered test. Click on the **View Test Detail** button.
7272

73-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/auto-heal/AHStep3.png').default} alt="Image" className="doc_img" width="1232" height="534" style={{ width:'700px', height:'auto'}}/>
74-
7573
**Step 4:** Click on the **band-aid** icon as shown below to check what part of your test case is healed.
7674

77-
<img loading="lazy" src={require('../assets/images/hyperexecute/features/auto-heal/AHStep4.png').default} alt="Image" className="doc_img" width="1232" height="534" style={{ width:'700px', height:'auto'}}/>
78-
7975
## How Auto Healing Works
8076

81-
The Auto Healing feature is designed to automatically recover from certain types of failures during the execution of your test scripts. Suppose a test fails because of a network outage. Auto Healing can automatically retry the test. Or, if a test fails because an element on the page is not found, Auto Healing can try to find the element again or log the error and move on to the next test.
82-
83-
Auto Healing is especially helpful for flaky tests, which are tests that sometimes pass and sometimes fail even though the underlying code has not changed. Flaky tests can be caused by a variety of factors, such as network outages, resource shortages, or browser crashes. Auto Healing can help you overcome these issues by automatically recovering from failures and retrying your tests.
77+
Auto Healing employs a dynamic locator strategy that adapts to DOM (Document Object Model) changes in real-time. When an element is initially located, the system records its DOM path and associated attributes. If subsequent attempts to find the element fail due to application updates, the Auto Healing mechanism activates. It analyzes the current DOM structure, comparing it against the previously recorded state, and generates new, contextually relevant locators by intelligently combining element attributes and hierarchical information. This process occurs seamlessly during test runtime, allowing scripts to continue execution despite locator changes. The system continuously monitors the web page for DOM modifications, ensuring sustained test reliability even in the face of frequent application updates.
8478

8579
## Benefits of Auto Healing
8680
Here are some of the benefits of using HyperExecute's Auto Healing feature:
8781

8882
- **Reduces the number of Flaky Tests:** Flaky tests are tests that fail intermittently, even though the underlying code has not changed. This can be caused by a variety of factors, such as unstable test environments, network latency, or changes in the browser's rendering engine. Auto Healing can help reduce the number of flaky tests by automatically retrying failed tests a certain number of times.
89-
9083
- **Improves Test Reliability:** By automatically recovering from failures, Auto Healing can help improve the reliability of your test suite. This means that you can be more confident that your tests will always pass, even if there are temporary disruptions to the test environment.
91-
9284
- **Saves Time and Effort:** Auto Healing can help save you time and effort by automating the process of recovering from failures. This means that you can focus on other tasks, such as developing new tests or fixing bugs.
9385

94-
9586
## Limitations
9687
While the Auto Healing feature is designed to handle a wide range of issues, there are certain limitations to be aware of:
9788

9889
- **Non-recoverable Errors:** Auto Healing cannot recover from certain types of errors, such as WebDriver initialization errors or system-level failures.
99-
10090
- **Test Accuracy:** While Auto Healing can reduce test flakiness, it may also mask real issues in your application or test scripts. It's important to review the logs and understand why a test needed healing.
101-
10291
- **Performance Impact:** While typically minimal, enabling Auto Healing can have a slight impact on test execution time due to the additional checks and recovery mechanisms.
10392

10493
## Best Practices
10594
By following these best practices, you can use auto healing to improve the reliability and efficiency of your test suite without introducing new risks.
10695

10796
- Use a test automation framework that supports Auto Healing. This will make it easier to implement and manage Auto Healing in your test suite.
108-
10997
- Identify the types of errors that you want to recover from. Not all errors can be recovered automatically. Focus on recovering from the most common and impactful errors.
110-
11198
- Configure auto healing to retry tests a limited number of times. This will help to prevent infinite loops and resource exhaustion.
112-
11399
- Log all Auto Healing activity. This will help you understand why tests are failing and to troubleshoot any problems that occur.
114-
115100
- Monitor the effectiveness of Auto Healing. Track the number of tests that are healed and the number of false positives. This will help you to determine whether or not auto healing is providing a net benefit.

0 commit comments

Comments
 (0)