Skip to content

Commit 485ccd4

Browse files
amanchopra1905sandeepyadav-lt
authored andcommitted
Merge pull request #2154 from sandeepyadav-lt/atx-5955
Add AI Root Cause Analysis documentation and related images
1 parent ae49e24 commit 485ccd4

File tree

5 files changed

+321
-0
lines changed

5 files changed

+321
-0
lines changed
621 KB
Loading
671 KB
Loading
276 KB
Loading
Lines changed: 320 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,320 @@
1+
---
2+
id: analytics-ai-root-cause-analysis
3+
title: AI Root Cause Analysis (AI RCA) - Test Intelligence
4+
sidebar_label: AI Root Cause Analysis
5+
description: Automatically analyze test failures with AI-powered Root Cause Analysis. Get instant insights into test failure patterns and accelerate debugging with actionable RCA results.
6+
keywords:
7+
- analytics
8+
- AI RCA
9+
- root cause analysis
10+
- test intelligence
11+
- test failure analysis
12+
- debugging
13+
- AI insights
14+
url: https://www.lambdatest.com/support/docs/analytics-ai-root-cause-analysis/
15+
site_name: LambdaTest
16+
slug: analytics-ai-root-cause-analysis/
17+
---
18+
19+
<script type="application/ld+json"
20+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
21+
"@context": "https://schema.org",
22+
"@type": "BreadcrumbList",
23+
"itemListElement": [{
24+
"@type": "ListItem",
25+
"position": 1,
26+
"name": "Home",
27+
"item": "https://www.lambdatest.com"
28+
},{
29+
"@type": "ListItem",
30+
"position": 2,
31+
"name": "Support",
32+
"item": "https://www.lambdatest.com/support/docs/"
33+
},{
34+
"@type": "ListItem",
35+
"position": 3,
36+
"name": "AI Root Cause Analysis",
37+
"item": "https://www.lambdatest.com/support/docs/analytics-ai-root-cause-analysis/"
38+
}]
39+
})
40+
}}
41+
></script>
42+
43+
AI Root Cause Analysis (AI RCA) in LambdaTest 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.
44+
45+
## What is AI Root Cause Analysis?
46+
47+
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:
48+
49+
- **Automated failure analysis** that runs immediately when tests fail
50+
- **Intelligent root cause identification** distinguishing between primary causes and cascading symptoms
51+
- **Actionable steps to fix** with specific fixes and recommendations
52+
- **Historical trend analysis** to identify recurring issues and patterns
53+
- **Comprehensive error timelines** showing the sequence of events leading to failures
54+
55+
## Prerequisites for AI RCA
56+
57+
1. **Active LambdaTest Account**: You should have an active LambdaTest account with appropriate permissions.
58+
2. **Subscription Plan**: This feature is available for users with HyperExecute or App/Web Automation subscription plans.
59+
3. **Available Credits**: Tests will only be processed through RCA when sufficient credits are available. For more information on credit management, see our [Credits Management](/docs/credits-management/) documentation.
60+
4. **Test Failures**: AI RCA requires at least one test failure to generate analysis. The system learns from your test execution patterns.
61+
5. **Access to Insights**: You should have access to the LambdaTest Insights platform under **Insights** tab.
62+
63+
## Configuration & Setup
64+
65+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-configuration.png').default} alt="cmd" width="800" height="400" className="doc_img"/>
66+
67+
### Step 1: Access Organization Settings
68+
69+
1. Navigate to **Organization Settings** in your LambdaTest dashboard
70+
2. In the left sidebar, expand the **Insights** section under **Org Product Preferences**
71+
3. Select **Automatic AI RCA** from the available options
72+
73+
### Step 2: Enable AI RCA
74+
75+
1. **Toggle the Feature**: Use the blue toggle switch to enable "Automatic AI RCA"
76+
2. **Configure Analysis Scope**: Choose which types of test failures to analyze:
77+
- **All failures**: Analyze every failed test, regardless of previous status
78+
- **New failures**: Analyze only tests that have failed recently after having passed at least 10 consecutive times previously.
79+
- **Always failing**: Analyze only tests that have failed in all of their previous 5 runs to identify persistent issues.
80+
81+
### Step 3: Set Special Instructions (Optional)
82+
83+
Provide context or specific guidance for the AI to consider during analysis:
84+
85+
1. Click on the **Special Instructions** section
86+
2. Enter any special instructions or context that should be considered during AI root cause analysis
87+
3. Use the "Show examples" link for guidance on effective instruction writing
88+
89+
**Example Instructions:**
90+
91+
:::tip
92+
Our CRM application has specific failure patterns to watch for:
93+
94+
**PRIORITY CATEGORIES**
95+
1. **Database Connection Issues** - Our PostgreSQL connection pool is limited to 20 connections. Look for connection timeouts, pool exhaustion, or slow query performance.
96+
97+
2. **Third-party API Failures** - We integrate with Salesforce, HubSpot, and Mailchimp. These external APIs often have rate limits and intermittent failures that cause our tests to fail.
98+
99+
3. **File Upload/Processing Issues** - Contact import via CSV files often fails due to file size limits (10MB max) or malformed data. Check for upload timeouts and validation errors.
100+
101+
4. **Authentication/Authorization** - We use OAuth 2.0 with multiple providers. Token expiration and permission changes frequently cause test failures.
102+
103+
5. **UI Element Timing Issues** - Our CRM uses dynamic loading for contact lists and reports. Elements may not be ready when tests try to interact with them.
104+
105+
**SPECIFIC CONTEXT**
106+
- Our test environment has limited resources compared to production
107+
- We run tests during business hours when external APIs are under heavy load
108+
- Focus on identifying whether failures are environment-specific or application bugs
109+
- Prioritize failures that affect core CRM functionality (contact management, lead tracking, reporting)
110+
- Consider our custom error handling - we log all errors to Sentry and show user-friendly messages
111+
112+
**IGNORE THESE COMMON FALSE POSITIVES**
113+
- Browser console warnings that don't affect functionality
114+
- Network requests to analytics services (Google Analytics, Hotjar)
115+
- Minor UI layout shifts that don't break functionality
116+
:::
117+
118+
**Possible Categories and Descriptions:**
119+
120+
| Category | Description | When to Use |
121+
|----------|-------------|-------------|
122+
| **Database Issues** | Connection timeouts, query performance, data integrity problems | When tests fail during data operations (CRUD, reports, imports) |
123+
| **API Integration** | Third-party service failures, rate limiting, authentication issues | When tests interact with external services (Salesforce, payment gateways) |
124+
| **UI/UX Problems** | Element not found, timing issues, responsive design failures | When tests fail on user interface interactions |
125+
| **Performance Issues** | Slow page loads, memory leaks, resource exhaustion | When tests timeout or run very slowly |
126+
| **Environment Issues** | Test data problems, configuration mismatches, infrastructure failures | When failures are environment-specific rather than code issues |
127+
| **Authentication/Authorization** | Login failures, permission errors, session timeouts | When tests fail during user authentication or access control |
128+
| **File Processing** | Upload failures, format validation, processing timeouts | When tests involve file operations (imports, exports, attachments) |
129+
| **Network Issues** | Connectivity problems, DNS failures, proxy issues | When tests fail due to network-related problems |
130+
131+
### Step 4: Configure Intelligent Targeting
132+
133+
Configure intelligent targeting rules to precisely control which tests, builds, tags, or jobs are included in AI-powered analysis:
134+
135+
1. **Add Targeting Rules**: Enter regex patterns in the input field
136+
2. **Click Include (+) or Exclude (-)**: Choose whether to include or exclude matching tests
137+
3. **Configure Multiple Criteria**: Set targeting rules for:
138+
- **Test Names**: Target specific test suites or test patterns
139+
- **Build Tags**: Include or exclude builds with specific tags
140+
- **Test Tags**: Include or exclude tests with specific tags (e.g., playwright_test, atxHyperexecute_test)
141+
- **Build Tags**: Include or exclude builds with specific tags (e.g., hourly, nightly)
142+
- **Job Labels**: Include tests with specific job labels or tags
143+
144+
#### Example Configuration
145+
146+
:::tip
147+
**Test Name:**
148+
- **Include**: `.*prod.*` - Only analyze tests with name containing "prod"
149+
- **Exclude**: `.*non-critical.*` - Skip tests with name containing "non-critical"
150+
151+
**Build Tag:**
152+
- **Include**: `^hourly` - Only analyze builds with tag starting with "hourly"
153+
154+
**Failure Type:**
155+
- **Include**: `ApiError5xx|ResourceLoadFailure` - Focus on API and resource loading failures
156+
- **Exclude**: `TestScriptError` - Skip script-related errors for this analysis
157+
158+
**Browser/OS:**
159+
- **Include**: `Chrome.*MacOS|Chrome.*Windows` - Target Chrome on Mac and Windows
160+
- **Exclude**: `.*Linux.*` - Skip Linux environments
161+
162+
**Test Tags:**
163+
- **Include**: `playwright_test|atxHyperexecute_test` - Focus on specific test frameworks
164+
- **Exclude**: `.*smoke.*` - Skip smoke tests
165+
166+
**Result**: AI-powered analysis will run only on production tests (excluding non-critical ones) from hourly builds, focusing on API and resource failures in Chrome browsers on Mac/Windows, using Playwright or HyperExecute test frameworks, while excluding smoke tests.
167+
:::
168+
169+
170+
### Step 5: Save Configuration
171+
172+
1. Click **Save Configuration** to apply your settings
173+
2. The settings will be applied to all users in your organization and cannot be modified by individual users or need admin level privileges.
174+
175+
## RCA Output & Interpretation
176+
177+
### Where to View RCA Results
178+
179+
AI RCA results are available in multiple locations across the LambdaTest platform:
180+
181+
1. **TMS Dashboard**: View RCA results directly in your test execution dashboard
182+
2. **HyperExecute Dashboard**: Access detailed RCA analysis for HyperExecute jobs
183+
3. **Insights Dashboard**: Comprehensive RCA analytics and trend analysis
184+
185+
<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"/>
186+
187+
### Understanding RCA Output
188+
189+
The RCA output provides a unified analysis with:
190+
191+
- **Primary Root Cause**: The main issue identified by AI analysis
192+
- **Cascading Symptoms**: Secondary issues that contribute to the problem but aren't the primary cause
193+
- **Severity Level**: High, Medium, or Low severity classification
194+
- **Error Category**: JavaScript Error, Network Error, Environment Issue, etc.
195+
196+
<details>
197+
<summary>View Example RCA</summary>
198+
199+
**Example RCA Summary:**
200+
> **Problem**: Contact creation test fails after 30 seconds
201+
> **Root Cause**: Database connection pool is full (10/10 connections used)
202+
> **Impact**: New contact requests wait in queue until connections free up
203+
> **Fix**: Increase connection pool from 10 to 50 connections
204+
205+
#### Error Timeline
206+
207+
The Error Timeline provides a chronological sequence of events leading to the failure:
208+
209+
**Example Timeline for CRM Contact Creation Test Failure:**
210+
1. **Test starts** - Navigate to contacts page (1s)
211+
2. **Fill form** - Enter contact details (3s)
212+
3. **Click submit** - Create contact button clicked (4s)
213+
4. **Connection issue** - Database pool full, request queued (4s)
214+
5. **Wait timeout** - No connections available (30s)
215+
6. **Test fails** - "Contact creation timeout"
216+
217+
#### Steps to Fix
218+
219+
Each RCA includes specific, actionable steps to fix with clear implementation guidance:
220+
221+
**Database Connection Issues:**
222+
- **Quick Fix**: Increase connection pool from 10 to 50
223+
- **Code**: `spring.datasource.hikari.maximum-pool-size=50`
224+
- **Test Fix**: Add connection health check before form submission
225+
226+
**Form Submission Failures:**
227+
- **Quick Fix**: Add retry logic with 3 attempts
228+
- **Code**: `retry(createContact, { maxAttempts: 3, delay: 2000 })`
229+
- **Test Fix**: Mock database calls in test environment
230+
231+
**Performance Issues:**
232+
- **Quick Fix**: Increase timeout to 45 seconds
233+
- **Code**: `waitForElement('#success-message', { timeout: 45000 })`
234+
- **Test Fix**: Use lightweight test data
235+
236+
</details>
237+
238+
### RCA Category Trends Widget
239+
240+
The RCA Category Trends widget in Insights enables you to:
241+
242+
1. **View Historical Trends**: See how different RCA categories have evolved over time
243+
2. **Drill Down Analysis**: Click on specific categories to analyze test failure patterns
244+
3. **Identify Recurring Issues**: Spot patterns in failure types to prioritize fixes
245+
4. **Track Improvement**: Monitor the effectiveness of your remediation efforts
246+
247+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-widget.png').default} alt="cmd" width="800" height="400" className="doc_img"/>
248+
249+
## Best Practices
250+
251+
### 1. Effective Configuration
252+
253+
- **Start with "All failures"** to get comprehensive coverage, then refine based on your needs
254+
- **Use specific special instructions** to guide the AI toward your most critical issues
255+
- **Set up intelligent targeting** to focus on relevant test suites and exclude noise
256+
257+
### 2. Interpreting Results
258+
259+
- **Focus on primary root causes** rather than cascading symptoms
260+
- **Prioritize high-severity issues** for immediate attention
261+
- **Use the error timeline** to understand the sequence of events
262+
- **Apply steps to fix systematically** starting with the most critical fixes
263+
264+
### 3. Continuous Improvement
265+
266+
- **Review RCA accuracy** and provide feedback when possible
267+
- **Monitor trend analysis** to identify recurring patterns
268+
- **Update special instructions** based on new insights and requirements
269+
- **Share RCA results** with your team to improve collective understanding
270+
271+
<!-- ### 4. Integration with Workflow
272+
273+
- **Set up alerts** for high-severity RCA findings
274+
- **Create tickets** directly from RCA results for systematic tracking
275+
- **Use RCA data** in sprint planning to prioritize bug fixes
276+
- **Document successful fixes** to build institutional knowledge -->
277+
278+
## Troubleshooting Common Issues
279+
280+
<details>
281+
<summary><strong>RCA Not Generating</strong></summary>
282+
283+
- **Check prerequisites**: Ensure you have the required subscription plan
284+
- **Verify credits availability**: AI RCA processing requires credits to be available in your account. Check your [Credits Management](/docs/credits-management/) page to ensure sufficient credits
285+
- **Verify test failures**: AI RCA requires actual test failures to analyze
286+
- **Review configuration**: Confirm AI RCA is enabled in organization settings
287+
- **Check permissions**: Ensure you have access to Analytics and Test Intelligence features
288+
289+
</details>
290+
291+
<details>
292+
<summary><strong>Inaccurate RCA Results</strong></summary>
293+
294+
- **Refine special instructions**: Provide more specific context about your application
295+
- **Update intelligent targeting**: Exclude irrelevant tests that might confuse the analysis
296+
- **Review error categorization**: Ensure test failures are properly categorized
297+
- **Provide feedback**: Use any available feedback mechanisms to improve accuracy
298+
299+
</details>
300+
301+
<details>
302+
<summary><strong>Missing RCA Data</strong></summary>
303+
304+
- **Check time range**: Ensure you're looking at the correct time period
305+
- **Verify test execution**: Confirm tests actually failed during the specified period
306+
- **Review dashboard filters**: Check if any filters are excluding relevant data
307+
- **Contact support**: Reach out if RCA data appears to be missing
308+
309+
</details>
310+
311+
## Support
312+
313+
For any queries or issues related to AI Root Cause Analysis, please reach out to our [24/7 customer support](mailto:[email protected]). We're here to help you maximize the value of this powerful debugging tool!
314+
315+
---
316+
317+
**Related Documentation:**
318+
- [Smart Tags - Test Intelligence](/docs/analytics-smart-tags-test-intelligence/)
319+
- [Failure Categorization AI](/docs/analytics-test-failure-classification/)
320+
- [Test Insights Overview](/docs/analytics-test-insights/)

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3822,6 +3822,7 @@ module.exports = {
38223822
"analytics-build-comparison",
38233823
"analytics-smart-tags-test-intelligence",
38243824
"analytics-test-failure-classification",
3825+
"analytics-ai-root-cause-analysis",
38253826
"insights-app-profiling",
38263827
],
38273828
},

0 commit comments

Comments
 (0)