Skip to content

Commit 844e77d

Browse files
authored
Merge pull request #2182 from sandeepyadav-lt/atx-5955-prod
[PROD] AI RCA Documentation
2 parents ae49e24 + e99c6b1 commit 844e77d

File tree

5 files changed

+331
-0
lines changed

5 files changed

+331
-0
lines changed
143 KB
Loading
142 KB
Loading
51.1 KB
Loading
Lines changed: 330 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,330 @@
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.webp').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 |
121+
|----------|-------------|
122+
| **Database Issues** | Connection timeouts, query performance, data integrity problems |
123+
| **API Integration** | Third-party service failures, rate limiting, authentication issues |
124+
| **UI/UX Problems** | Element not found, timing issues, responsive design failures |
125+
| **Performance Issues** | Slow page loads, memory leaks, resource exhaustion |
126+
| **Environment Issues** | Test data problems, configuration mismatches, infrastructure failures |
127+
| **Authentication/Authorization** | Login failures, permission errors, session timeouts |
128+
| **File Processing** | Upload failures, format validation, processing timeouts |
129+
| **Network Issues** | Connectivity problems, DNS failures, proxy issues |
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 Names**: Include or exclude builds with specific names (e.g., hourly, nightly)
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+
#### Rule Logic and Application
145+
146+
The intelligent targeting system applies rules using the following logic:
147+
148+
**Rule Evaluation Process:**
149+
1. **Include Rules (AND Logic)**: All Include rules within the same category must match for a test to be considered
150+
2. **Exclude Rules (OR Logic)**: Any Exclude rule that matches will immediately exclude the test from analysis
151+
3. **Cross-Category Logic**: Include rules across different categories (Test Names, Build Tags, etc.) must ALL match
152+
4. **Exclusion Precedence**: Exclude rules take priority over Include rules - if any exclude rule matches, the test is excluded regardless of include matches
153+
154+
**Best Practices for Rule Configuration:**
155+
- **Start Broad**: Begin with general include rules, then add specific exclusions
156+
- **Use Specific Patterns**: Avoid overly broad regex patterns that might include unintended tests
157+
- **Test Your Rules**: Verify rule behavior with sample test names and tags before applying
158+
- **Regular Review**: Periodically review and update rules based on changing test patterns
159+
160+
<!-- #### Example Configuration -->
161+
#### Example Configuration for Production Test Analysis
162+
163+
:::tip
164+
165+
**Test Name:**
166+
- **Include**: `.*prod.*` - Only analyze tests with name containing "prod"
167+
- **Exclude**: `.*non-critical.*` - Skip tests with name containing "non-critical"
168+
169+
**Build Tags:**
170+
- **Include**: `^hourly` - Only analyze builds with tag starting with "hourly"
171+
172+
**Test Tags:**
173+
- **Include**: `playwright_test|atxHyperexecute_test` - Focus on specific test frameworks
174+
- **Exclude**: `.*smoke.*` - Skip smoke tests
175+
176+
**Result**: AI-powered analysis will run only on production tests (excluding non-critical ones) from hourly builds, focusing on Playwright or HyperExecute test tags, while excluding smoke tests. This configuration helps narrow down analysis to the most critical test scenarios.
177+
:::
178+
179+
180+
### Step 5: Save Configuration
181+
182+
1. Click **Save Configuration** to apply your settings
183+
2. The settings will be applied to all users in your organization and cannot be modified by individual users or need admin level privileges.
184+
185+
## RCA Output & Interpretation
186+
187+
### Where to View RCA Results
188+
189+
AI RCA results are available in multiple locations across the LambdaTest platform:
190+
191+
1. **TMS Dashboard**: View RCA results directly in your test execution dashboard
192+
2. **HyperExecute Dashboard**: Access detailed RCA analysis for HyperExecute jobs
193+
3. **Insights Dashboard**: Comprehensive RCA analytics and trend analysis
194+
195+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-insights.webp').default} alt="cmd" width="800" height="400" className="doc_img"/>
196+
197+
### Understanding RCA Output
198+
199+
The RCA output provides a unified analysis with:
200+
201+
- **Primary Root Cause**: The main issue identified by AI analysis
202+
- **Cascading Symptoms**: Secondary issues that contribute to the problem but aren't the primary cause
203+
- **Severity Level**: High, Medium, or Low severity classification
204+
- **Error Category**: JavaScript Error, Network Error, Environment Issue, etc.
205+
206+
<details>
207+
<summary>View Example RCA</summary>
208+
209+
**Example RCA Summary:**
210+
> **Problem**: Contact creation test fails after 30 seconds
211+
> **Root Cause**: Database connection pool is full (10/10 connections used)
212+
> **Impact**: New contact requests wait in queue until connections free up
213+
> **Fix**: Increase connection pool from 10 to 50 connections
214+
215+
#### Error Timeline
216+
217+
The Error Timeline provides a chronological sequence of events leading to the failure:
218+
219+
**Example Timeline for CRM Contact Creation Test Failure:**
220+
1. **Test starts** - Navigate to contacts page (1s)
221+
2. **Fill form** - Enter contact details (3s)
222+
3. **Click submit** - Create contact button clicked (4s)
223+
4. **Connection issue** - Database pool full, request queued (4s)
224+
5. **Wait timeout** - No connections available (30s)
225+
6. **Test fails** - "Contact creation timeout"
226+
227+
#### Steps to Fix
228+
229+
Each RCA includes specific, actionable steps to fix with clear implementation guidance:
230+
231+
**Database Connection Issues:**
232+
- **Quick Fix**: Increase connection pool from 10 to 50
233+
- **Code**: `spring.datasource.hikari.maximum-pool-size=50`
234+
- **Test Fix**: Add connection health check before form submission
235+
236+
**Form Submission Failures:**
237+
- **Quick Fix**: Add retry logic with 3 attempts
238+
- **Code**: `retry(createContact, { maxAttempts: 3, delay: 2000 })`
239+
- **Test Fix**: Mock database calls in test environment
240+
241+
**Performance Issues:**
242+
- **Quick Fix**: Increase timeout to 45 seconds
243+
- **Code**: `waitForElement('#success-message', { timeout: 45000 })`
244+
- **Test Fix**: Use lightweight test data
245+
246+
</details>
247+
248+
### RCA Category Trends Widget
249+
250+
The RCA Category Trends widget in Insights enables you to:
251+
252+
1. **View Historical Trends**: See how different RCA categories have evolved over time
253+
2. **Drill Down Analysis**: Click on specific categories to analyze test failure patterns
254+
3. **Identify Recurring Issues**: Spot patterns in failure types to prioritize fixes
255+
4. **Track Improvement**: Monitor the effectiveness of your remediation efforts
256+
257+
<img loading="lazy" src={require('../assets/images/analytics/test-intelligence-ai-test-rca-widget.webp').default} alt="cmd" width="800" height="400" className="doc_img"/>
258+
259+
## Best Practices
260+
261+
### 1. Effective Configuration
262+
263+
- **Start with "All failures"** to get comprehensive coverage, then refine based on your needs
264+
- **Use specific special instructions** to guide the AI toward your most critical issues
265+
- **Set up intelligent targeting** to focus on relevant test suites and exclude noise
266+
267+
### 2. Interpreting Results
268+
269+
- **Focus on primary root causes** rather than cascading symptoms
270+
- **Prioritize high-severity issues** for immediate attention
271+
- **Use the error timeline** to understand the sequence of events
272+
- **Apply steps to fix systematically** starting with the most critical fixes
273+
274+
### 3. Continuous Improvement
275+
276+
- **Review RCA accuracy** and provide feedback when possible
277+
- **Monitor trend analysis** to identify recurring patterns
278+
- **Update special instructions** based on new insights and requirements
279+
- **Share RCA results** with your team to improve collective understanding
280+
281+
<!-- ### 4. Integration with Workflow
282+
283+
- **Set up alerts** for high-severity RCA findings
284+
- **Create tickets** directly from RCA results for systematic tracking
285+
- **Use RCA data** in sprint planning to prioritize bug fixes
286+
- **Document successful fixes** to build institutional knowledge -->
287+
288+
## Troubleshooting Common Issues
289+
290+
<details>
291+
<summary><strong>RCA Not Generating</strong></summary>
292+
293+
- **Check prerequisites**: Ensure you have the required subscription plan
294+
- **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
295+
- **Verify test failures**: AI RCA requires actual test failures to analyze
296+
- **Review configuration**: Confirm AI RCA is enabled in organization settings
297+
- **Check permissions**: Ensure you have access to Analytics and Test Intelligence features
298+
299+
</details>
300+
301+
<details>
302+
<summary><strong>Inaccurate RCA Results</strong></summary>
303+
304+
- **Refine special instructions**: Provide more specific context about your application
305+
- **Update intelligent targeting**: Exclude irrelevant tests that might confuse the analysis
306+
- **Review error categorization**: Ensure test failures are properly categorized
307+
- **Provide feedback**: Use any available feedback mechanisms to improve accuracy
308+
309+
</details>
310+
311+
<details>
312+
<summary><strong>Missing RCA Data</strong></summary>
313+
314+
- **Check time range**: Ensure you're looking at the correct time period
315+
- **Verify test execution**: Confirm tests actually failed during the specified period
316+
- **Review dashboard filters**: Check if any filters are excluding relevant data
317+
- **Contact support**: Reach out if RCA data appears to be missing
318+
319+
</details>
320+
321+
## Support
322+
323+
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!
324+
325+
---
326+
327+
**Related Documentation:**
328+
- [Smart Tags - Test Intelligence](/docs/analytics-smart-tags-test-intelligence/)
329+
- [Failure Categorization AI](/docs/analytics-test-failure-classification/)
330+
- [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)