Skip to content

Commit b21b84c

Browse files
authored
Merge pull request LambdaTest#2456 from surishubham/stage
Merge pull request LambdaTest#2455 from sandeepyadav-lt/prod-rca
2 parents 9ef1fe2 + ce8bf87 commit b21b84c

6 files changed

+128
-113
lines changed
71.4 KB
Loading
-97.5 KB
Binary file not shown.
169 KB
Loading
127 KB
Loading
33.8 KB
Loading

docs/analytics-ai-root-cause-analysis.md

Lines changed: 128 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,14 @@ import BrandName, { BRAND_URL } from '@site/src/component/BrandName';
4343
}}
4444
></script>
4545

46-
AI Root Cause Analysis (AI RCA) in <BrandName /> Analytics automatically analyzes failed tests to identify probable root causes and provides actionable insights to improve test stability and reduce debugging time. This AI-powered feature accelerates your debugging process by eliminating manual investigation and providing instant, comprehensive failure analysis.
46+
AI Root Cause Analysis (AI RCA) in <BrandName /> Analytics uses advanced AI-powered LLM technology to automatically analyze failed tests and identify their root causes. Instead of manually sifting through logs and error messages, AI RCA provides:
4747

48-
## What is AI Root Cause Analysis?
48+
- **Intelligent root cause identification** - distinguishes between primary causes and cascading symptoms
49+
- **Actionable fixes** - specific recommendations to resolve issues
50+
- **Error timelines** - chronological sequence of events leading to failures
51+
- **Trend analysis** - identifies recurring patterns across test executions
4952

50-
AI RCA is an intelligent feature that uses advanced machine learning algorithms to automatically analyze test failures and identify their root causes. Instead of manually sifting through logs and error messages, AI RCA provides:
51-
52-
- **Automated failure analysis** that runs immediately when tests fail
53-
- **Intelligent root cause identification** distinguishing between primary causes and cascading symptoms
54-
- **Actionable steps to fix** with specific fixes and recommendations
55-
- **Historical trend analysis** to identify recurring issues and patterns
56-
- **Comprehensive error timelines** showing the sequence of events leading to failures
53+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-output.webp').default} alt="RCA Output" width="800" height="400" className="doc_img"/>
5754

5855
## Prerequisites for AI RCA
5956

@@ -63,9 +60,123 @@ AI RCA is an intelligent feature that uses advanced machine learning algorithms
6360
4. **Test Failures**: AI RCA requires at least one test failure to generate analysis. The system learns from your test execution patterns.
6461
5. **Access to Insights**: You should have access to the <BrandName /> Insights platform under **Insights** tab.
6562

66-
## Configuration & Setup
63+
## RCA Generation Methods
64+
65+
<BrandName /> offers two methods to generate Root Cause Analysis:
66+
67+
- **Automatic RCA**: RCA is generated automatically for failed tests based on your configuration settings. Set it up once in Organization Settings, and RCA runs continuously for matching test failures.
68+
69+
- **Manual RCA**: Generate RCA on-demand for any failed test by clicking the **Generate RCA** button. Useful for investigating specific failures without setting up targeting rules.
70+
71+
:::tip When to Use Each Method
72+
- Use **Automatic RCA** for continuous monitoring of critical test suites where you want immediate analysis of every failure.
73+
- Use **Manual RCA** for ad-hoc debugging when you need to investigate a specific test failure without setting up automated rules.
74+
:::
75+
76+
| Feature | Automatic RCA | Manual RCA |
77+
|---------|---------------|------------|
78+
| **Trigger** | Runs automatically when configured tests fail | Click "Generate RCA" button |
79+
| **Targeting Rules** | Follows Analysis Scope and Intelligent Targeting settings | Any failed test on-demand |
80+
| **Custom RCA Categories** | ✓ Applied | ✓ Applied |
81+
| **Special Instructions** | ✓ Applied | ✓ Applied |
82+
| **Best For** | Continuous monitoring | Ad-hoc debugging |
83+
84+
:::note Shared Configuration
85+
**Custom RCA Categories** and **Special Instructions** configured in Organization Settings apply to both Automatic and Manual RCA generation. This ensures consistent categorization and analysis context across all RCA results.
86+
:::
87+
88+
## Generate RCA Manually
89+
90+
You can manually generate RCA for any failed test from the **Test Manager** or **HyperExecute** dashboards.
91+
92+
### From Test Manager (TMS)
93+
94+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-tms.webp').default} alt="Generate RCA in Test Manager" width="800" height="400" className="doc_img"/>
95+
96+
1. Navigate to **Test Manager** → open a **Test Run**
97+
2. Go to the **Test Instances** tab
98+
3. Locate the failed test and click the **Generate RCA** button
99+
4. View the RCA output with root cause, severity, and recommended fixes
100+
101+
### From HyperExecute
102+
103+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-hyperexecute.webp').default} alt="Generate RCA in HyperExecute" width="800" height="400" className="doc_img"/>
104+
105+
1. Navigate to **HyperExecute** → open the failed **Job**
106+
2. Select the **Tasks** tab and expand the failed scenario
107+
3. Click the **Generate RCA** button next to the failed test
108+
4. View the generated RCA with actionable insights
109+
110+
### From Insights Dashboard
111+
112+
The Insights dashboard provides aggregated RCA analytics and trend analysis across all your test executions.
113+
114+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-insights.webp').default} alt="RCA Insights Dashboard" width="800" height="400" className="doc_img"/>
115+
116+
1. Navigate to **Insights** from the <BrandName /> dashboard
117+
2. Access the **RCA Category Trends** widget to view aggregated data
118+
3. Click on specific categories to drill down into detailed analysis
119+
4. Track historical trends to monitor improvement over time
120+
121+
## Understanding RCA Output
122+
123+
When you generate or view an RCA, a detailed analysis panel opens with the following components:
124+
125+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-output.webp').default} alt="RCA Output" width="800" height="400" className="doc_img"/>
126+
127+
### Error Classification
128+
129+
At the top of the RCA panel, you'll see:
130+
131+
- **Failure Category**: The type of failure (e.g., `App Bug`, `Product Bug`)
132+
- **Root Cause Type**: The specific error category (e.g., `JavaScriptError`, `Backend Contract Violation`)
133+
- **Error Summary**: A one-line description of the error with file location
134+
- **Error Trends (Test)**: Shows how often this specific test has failed recently
135+
- **Error Trends (Global)**: Shows the error pattern across all tests over time
136+
137+
### Detailed Analysis
138+
139+
Expand this section to see AI-generated insights explaining:
140+
- Why the component or test failed
141+
- What the error indicates about the underlying issue
142+
- The specific file and line number where the error occurred
143+
144+
### Event Timeline
145+
146+
The Event Timeline shows the chronological sequence of events during test execution:
147+
148+
- **✓ Passed steps**: Steps that completed successfully (e.g., "Test Execution Started")
149+
- **✗ Failed steps**: Steps where issues occurred, tagged as:
150+
- **Root Cause**: The primary reason for failure
151+
- **Effect**: Secondary failures caused by the root cause
152+
153+
Click **Show/Hide** on any event to expand details including:
154+
- **Code**: View the relevant source code
155+
- **Stacktrace**: See the full error stack trace
156+
- **Assets**: Access screenshots, logs, or other artifacts
157+
158+
### How to Fix It
159+
160+
At the bottom of the RCA panel, you'll find numbered, actionable steps to resolve the issue. These recommendations include:
161+
- Specific actions to take in your application or test
162+
- Configuration changes to consider
163+
- Debugging steps to verify the fix
164+
165+
### Provide Feedback
67166

68-
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-configuration.webp').default} alt="cmd" width="800" height="400" className="doc_img"/>
167+
Help improve RCA accuracy using the feedback options at the bottom:
168+
- **Thumbs up/down**: Rate if the analysis was helpful
169+
- **Suggest Improvements**: Click to open a feedback form where you can:
170+
- Adjust the failure category and root cause classification
171+
- Provide a custom root cause if the AI classification was incorrect
172+
- Add additional context or feedback
173+
174+
175+
## Configure Automatic RCA
176+
177+
Set up Automatic RCA to continuously analyze test failures based on your targeting rules.
178+
179+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-configuration.webp').default} alt="Automatic AI RCA Configuration" width="800" height="400" className="doc_img"/>
69180

70181
### Step 1: Access Organization Settings
71182

@@ -231,110 +342,14 @@ Provide context or specific guidance for the AI to consider during analysis:
231342
1. Click **Save Configuration** to apply your settings
232343
2. The settings will be applied to all users in your organization and cannot be modified by individual users or need admin level privileges.
233344

234-
## RCA Output & Interpretation
235-
236-
### Where to View RCA Results
237-
238-
AI RCA results are available in multiple locations across the <BrandName /> platform:
239-
240-
1. **TMS Dashboard**: View RCA results directly in your test execution dashboard
241-
2. **HyperExecute Dashboard**: Access detailed RCA analysis for HyperExecute jobs
242-
3. **Insights Dashboard**: Comprehensive RCA analytics and trend analysis
243-
244-
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-insights.png').default} alt="cmd" width="800" height="400" className="doc_img"/>
245-
246-
### Understanding RCA Output
247-
248-
The RCA output provides a unified analysis with:
249-
250-
- **Primary Root Cause**: The main issue identified by AI analysis
251-
- **Cascading Symptoms**: Secondary issues that contribute to the problem but aren't the primary cause
252-
- **Severity Level**: High, Medium, or Low severity classification
253-
- **Error Category**: JavaScript Error, Network Error, Environment Issue, etc.
254-
255-
<details>
256-
<summary>View Example RCA</summary>
257-
258-
**Example RCA Summary:**
259-
> **Problem**: Contact creation test fails after 30 seconds
260-
> **Root Cause**: Database connection pool is full (10/10 connections used)
261-
> **Impact**: New contact requests wait in queue until connections free up
262-
> **Fix**: Increase connection pool from 10 to 50 connections
263-
264-
#### Error Timeline
265-
266-
The Error Timeline provides a chronological sequence of events leading to the failure:
267-
268-
**Example Timeline for CRM Contact Creation Test Failure:**
269-
1. **Test starts** - Navigate to contacts page (1s)
270-
2. **Fill form** - Enter contact details (3s)
271-
3. **Click submit** - Create contact button clicked (4s)
272-
4. **Connection issue** - Database pool full, request queued (4s)
273-
5. **Wait timeout** - No connections available (30s)
274-
6. **Test fails** - "Contact creation timeout"
275-
276-
#### Steps to Fix
277-
278-
Each RCA includes specific, actionable steps to fix with clear implementation guidance:
279-
280-
**Database Connection Issues:**
281-
- **Quick Fix**: Increase connection pool from 10 to 50
282-
- **Code**: `spring.datasource.hikari.maximum-pool-size=50`
283-
- **Test Fix**: Add connection health check before form submission
284-
285-
**Form Submission Failures:**
286-
- **Quick Fix**: Add retry logic with 3 attempts
287-
- **Code**: `retry(createContact, { maxAttempts: 3, delay: 2000 })`
288-
- **Test Fix**: Mock database calls in test environment
289-
290-
**Performance Issues:**
291-
- **Quick Fix**: Increase timeout to 45 seconds
292-
- **Code**: `waitForElement('#success-message', { timeout: 45000 })`
293-
- **Test Fix**: Use lightweight test data
294-
295-
</details>
296-
297-
### RCA Category Trends Widget
298-
299-
The RCA Category Trends widget in Insights enables you to:
300-
301-
1. **View Historical Trends**: See how different RCA categories have evolved over time
302-
2. **Drill Down Analysis**: Click on specific categories to analyze test failure patterns
303-
3. **Identify Recurring Issues**: Spot patterns in failure types to prioritize fixes
304-
4. **Track Improvement**: Monitor the effectiveness of your remediation efforts
305-
306-
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-insights.png').default} alt="cmd" width="800" height="400" className="doc_img"/>
307-
308345
## Best Practices
309346

310-
### 1. Effective Configuration
311-
312-
- **Start with "All failures"** to get comprehensive coverage, then refine based on your needs
313-
- **Use specific special instructions** to guide the AI toward your most critical issues
314-
- **Set up intelligent targeting** to focus on relevant test suites and exclude noise
315-
- **Create custom RCA categories** to organize and track failure patterns systematically
316-
317-
### 2. Interpreting Results
318-
319-
- **Focus on primary root causes** rather than cascading symptoms
320-
- **Prioritize high-severity issues** for immediate attention
321-
- **Use the error timeline** to understand the sequence of events
322-
- **Apply steps to fix systematically** starting with the most critical fixes
323-
324-
### 3. Continuous Improvement
325-
326-
- **Review RCA accuracy** and provide feedback when possible
327-
- **Monitor trend analysis** to identify recurring patterns
328-
- **Update special instructions** based on new insights and requirements
329-
- **Refine custom RCA categories** to better match your failure patterns and organizational needs
330-
- **Share RCA results** with your team to improve collective understanding
331-
332-
<!-- ### 4. Integration with Workflow
333-
334-
- **Set up alerts** for high-severity RCA findings
335-
- **Create tickets** directly from RCA results for systematic tracking
336-
- **Use RCA data** in sprint planning to prioritize bug fixes
337-
- **Document successful fixes** to build institutional knowledge -->
347+
- **Focus on Root Cause events** in the Event Timeline rather than Effect events when debugging
348+
- **Check Error Trends** to see if this is a recurring issue or a new failure
349+
- **Use the Code and Stacktrace tabs** to pinpoint the exact location of the error
350+
- **Follow the "How to Fix It" steps** systematically for faster resolution
351+
- **Provide feedback** using thumbs up/down to help improve RCA accuracy over time
352+
- **Monitor trends in Insights** to identify patterns and prioritize fixes
338353

339354
## Troubleshooting Common Issues
340355

0 commit comments

Comments
 (0)