Skip to content

Commit 1ebd30f

Browse files
committed
Merge pull request #2274 from meraj-lt/stage
Add new images and update documentation for LambdaTest AI Cloud GitHu…
1 parent 70d406b commit 1ebd30f

File tree

6 files changed

+331
-0
lines changed

6 files changed

+331
-0
lines changed
93.8 KB
Loading
77.3 KB
Loading
116 KB
Loading
120 KB
Loading
82.9 KB
Loading

docs/kaneai-github-app.md

Lines changed: 331 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,331 @@
1+
---
2+
id: github-app-integration
3+
title: LambdaTest AI Cloud GitHub App Integration
4+
hide_title: true
5+
sidebar_label: KaneAI GitHub App Integration
6+
description: Step-by-step guide to install, configure, and use the LambdaTest AI Cloud GitHub App for automated AI-powered test case generation.
7+
keywords:
8+
- github app
9+
- lambdatest integration
10+
- AI test generation
11+
- PR automation
12+
- test management
13+
url: https://www.lambdatest.com/support/docs/github-app-integration/
14+
site_name: LambdaTest
15+
slug: github-app-integration/
16+
---
17+
18+
<script type="application/ld+json"
19+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
20+
"@context": "https://schema.org",
21+
"@type": "BreadcrumbList",
22+
"itemListElement": [{
23+
"@type": "ListItem",
24+
"position": 1,
25+
"name": "LambdaTest",
26+
"item": "https://www.lambdatest.com"
27+
},{
28+
"@type": "ListItem",
29+
"position": 2,
30+
"name": "Support",
31+
"item": "https://www.lambdatest.com/support/docs/"
32+
},{
33+
"@type": "ListItem",
34+
"position": 3,
35+
"name": "LambdaTest AI Cloud GitHub App Integration",
36+
"item": "https://www.lambdatest.com/support/docs/github-app-integration/"
37+
}]
38+
})
39+
}}
40+
></script>
41+
42+
# LambdaTest AI Cloud GitHub App Integration
43+
44+
## 1. Overview
45+
46+
### What is the LambdaTest AI Cloud GitHub App?
47+
48+
The LambdaTest AI Cloud GitHub App leverages KaneAI, our advanced AI testing agent, to transform how your team approaches quality assurance. Instead of manually writing test cases for every code change, the app intelligently analyzes your pull requests, understands the business logic and technical implementation, and automatically generates relevant end-to-end test scenarios.
49+
50+
### How It Works
51+
52+
When a developer creates a pull request, simply add a comment to trigger the AI workflow. The app then:
53+
54+
1. **Analyzes** the code changes, PR content and repository context (including your README)
55+
2. **Generates** intelligent test cases using KaneAI's AI engine
56+
3. **Authors** executable test scripts with proper assertions and validations
57+
4. **Executes** tests on LambdaTest's cloud infrastructure via HyperExecute
58+
5. **Reports** results with AI-powered Root Cause Analysis (RCA) for failures
59+
60+
All of this happens automatically, with real-time progress updates posted directly to your pull request.
61+
62+
### Key Benefits
63+
64+
- **Accelerated Test Coverage**: Automatically generate comprehensive test cases for every PR, significantly reducing the time from code commit to production-ready testing
65+
- **Intelligent Test Design**: AI-powered analysis creates contextually relevant test scenarios that understand both code changes and business logic
66+
- **Seamless Developer Experience**: Native GitHub integration means developers never leave their workflow—all updates, results, and insights appear directly in PR comments
67+
- **Enterprise Scalability**: Leverages HyperExecute for parallel test execution across multiple browsers, devices, and platforms
68+
- **Continuous Quality Intelligence**: AI-driven Root Cause Analysis automatically diagnoses test failures, reducing debugging time and accelerating resolution
69+
- **Unified Test Management**: All generated tests sync with LambdaTest Test Manager, providing centralized visibility and control across your QA operations
70+
71+
---
72+
73+
## 2. Prerequisites
74+
75+
Before implementing the LambdaTest AI Cloud GitHub App in your development workflow, ensure your organization has the following:
76+
77+
### Account Requirements
78+
79+
- **LambdaTest Enterprise Account**: An active LambdaTest account with appropriate licensing. [Sign up now](https://accounts.lambdatest.com/register) if you don't have an account yet.
80+
81+
- **KaneAI Access**: This integration requires KaneAI to be enabled on your LambdaTest account. New signups receive a 14-day free trial of KaneAI with full feature access.
82+
83+
### Repository Requirements
84+
85+
- **GitHub Repository Access**: Administrative access to the GitHub repositories where you want to install the app
86+
<!-- - **Repository README**: A well-documented README.md file in your repository (the AI uses this for contextual understanding of your application) -->
87+
88+
89+
---
90+
91+
## 3. Installation
92+
93+
Follow these steps to install and authorize the LambdaTest AI Cloud GitHub App for your organization.
94+
95+
### Step 1: Access GitHub Marketplace
96+
97+
Navigate to the [LambdaTest AI Cloud GitHub App](https://github.com/apps/lambdatest-ai-cloud) on GitHub Marketplace and click **Install** to begin the installation process.
98+
99+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/install-github-app.png').default} alt="Trigger KaneAI workflow" className="doc_img"/>
100+
101+
102+
### Step 2: Configure Repository Access
103+
104+
During installation, you'll need to specify which repositories should have access to the app:
105+
106+
- **Organization-wide Installation**: Select **All repositories** to enable the app across your entire GitHub organization
107+
- **Selective Installation**: Choose **Only select repositories** and specify individual repositories for more granular control
108+
109+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/github-repository-selection.png').default} alt="Trigger KaneAI workflow" className="doc_img"/>
110+
111+
After making your selection and clicking the **Install and Authorize** button, you will be redirected to LambdaTest's integration page where under the **My Integrations** section you will be able to see this application.
112+
113+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/integration-success.png').default} alt="Trigger KaneAI workflow" className="doc_img"/>
114+
115+
116+
:::tip Best Practice
117+
For pilot programs or initial rollouts, we recommend installing on a select subset of repositories first. Once your team is comfortable with the workflow, you can expand access organization-wide.
118+
:::
119+
120+
### Step 3: Verify Successful Installation
121+
122+
Confirm the installation was successful by:
123+
124+
1. Navigating to your GitHub organization's **Settings** page
125+
2. In left side menu under **Integrations**, click **Applications**.
126+
3. Selecting **Installed GitHub Apps** from the left sidebar
127+
4. Verifying that **LambdaTest AI Cloud** appears in the list of installed applications
128+
129+
You can also click on the app to review and modify repository access permissions at any time.
130+
131+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/github-app-install-success-page.png').default} alt="Trigger KaneAI workflow" className="doc_img"/>
132+
133+
---
134+
135+
## 3.1 Uninstalling the GitHub App
136+
137+
If you need to remove the LambdaTest AI Cloud GitHub App from your organization:
138+
139+
1. Navigate to the [LambdaTest AI Cloud GitHub App](https://github.com/apps/lambdatest-ai-cloud) on GitHub Marketplace
140+
2. Click on the **Configure** button to access the app settings
141+
3. Scroll down to the bottom of the page to find the **Danger Zone** section
142+
4. Click on the **Uninstall** button to remove the app from your organization
143+
5. Confirm the uninstallation when prompted
144+
145+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/uninstall-github-app.png').default} alt="Uninstall GitHub App" className="doc_img"/>
146+
147+
:::tip caution
148+
Uninstalling the GitHub App will stop all AI-powered test generation workflows on your pull requests. This action cannot be undone, and you'll need to reinstall the app to restore functionality.
149+
:::
150+
151+
---
152+
153+
## 4. Repository Configuration
154+
155+
After installing the GitHub App, each repository requires a configuration file to connect your GitHub workflow with your LambdaTest Test Manager environment. This configuration defines where tests should be stored, who should be assigned, and which environment to test against.
156+
157+
### Configuration File Setup
158+
159+
Create a `.lambdatest/config.yaml` file in the root directory of your repository with the following structure:
160+
161+
```yaml
162+
# LambdaTest AI Cloud Configuration
163+
project_id: "your_project_id"
164+
folder_id: "your_folder_id"
165+
assignee: your_user_id
166+
environment_id: environment_id
167+
test_url: "https://your-deployed-app-url.com/"
168+
```
169+
170+
### Configuration Parameters
171+
172+
| Parameter | Description | How to Obtain |
173+
|-----------|-------------|---------------|
174+
| `project_id` | The unique identifier for your LambdaTest Test Manager project | Navigate to your project in Test Manager and copy the ID from the URL |
175+
| `folder_id` | The folder where generated test cases will be organized | Create or select a folder in Test Manager and obtain its ID from the URL |
176+
| `assignee` | The LambdaTest user ID who will be assigned to test runs for executions | Can be referenced from APIs |
177+
| `environment_id` | The target testing environment (browser, OS, device configurations) | Create environments in Test Manager and reference their IDs |
178+
| `test_url` | The base URL of your application under test | Your staging or testing environment URL where tests will be executed |
179+
180+
> **Note:** All configuration IDs can be retrieved programmatically from the [LambdaTest Test Manager API Documentation](https://www.lambdatest.com/support/api-doc/?key=test-management).
181+
182+
:::tip Maximize AI Context
183+
The `README.md` file in your repository is analyzed by KaneAI to understand your application's purpose, architecture, and business logic. A comprehensive README significantly improves the quality and relevance of generated test cases. Include:
184+
- Application overview and key features
185+
- User workflows and critical paths
186+
- Architecture and technology stack
187+
- Business rules and validation logic
188+
:::
189+
190+
### Repository Structure
191+
192+
Your final repository structure should look like this:
193+
194+
```
195+
your-repo/
196+
├── .lambdatest/
197+
│ └── config.yaml # LambdaTest configuration
198+
└── agent.md # Optional file for custom instructions to enhance responses
199+
├── src/ # Your application source code
200+
├── README.md # Detailed project documentation (used by AI)
201+
└── ... other project files
202+
```
203+
204+
### Configuration Best Practices
205+
206+
- **Environment Segregation**: Use separate `project_id` and `folder_id` values for different branches (e.g., staging vs. production) to maintain test organization
207+
- **Team Assignment**: Configure `assignee` to route test runs to the appropriate QA team member or use a shared team account for visibility
208+
- **Dynamic URLs**: For teams with ephemeral preview environments, consider parameterizing `test_url` or updating it per deployment
209+
- **Version Control**: Commit `.lambdatest/config.yaml` to your repository so all team members use consistent configuration
210+
211+
---
212+
213+
## 5. Triggering Test Generation
214+
215+
With the GitHub App installed and your repository configured, you're ready to start generating AI-powered tests for your pull requests.
216+
217+
### Initiating the Workflow
218+
219+
The test generation workflow is triggered through a simple comment on any pull request in your repository. Once your development work is ready for testing:
220+
221+
1. **Create a Pull Request**: Push your feature branch and open a PR as you normally would
222+
2. **Add a Trigger Comment**: Post any of the following commands in the PR comments section:
223+
224+
```bash
225+
@LambdaTest Validate this PR
226+
#OR
227+
@KaneAI Validate this PR
228+
```
229+
230+
Any of these commands will initiate the complete AI-powered testing workflow, from analysis to execution and reporting.
231+
232+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/1-flow_triggered.png').default} alt="Trigger KaneAI workflow" className="doc_img"/>
233+
234+
### What Happens Next
235+
236+
After you post the trigger comment, KaneAI immediately begins working:
237+
238+
1. **Code Analysis**: The AI examines all code changes in the pull request, including file modifications, additions, and deletions
239+
2. **Context Gathering**: Your repository's README.md, PR Title, Description, Comments and AGENT.md are analyzed to understand application context
240+
3. **Test Strategy**: Based on the changes and context, the AI determines which areas require testing and what scenarios to cover
241+
4. **Test Generation**: Intelligent test cases are created with appropriate assertions, validations, and edge case handling
242+
243+
This entire process typically completes within minutes, depending on the complexity of your code changes.
244+
245+
246+
## 6. Automated Workflow and Real-Time Tracking
247+
248+
The LambdaTest AI Cloud GitHub App provides complete transparency throughout the testing lifecycle. From the moment you trigger the workflow, you'll receive real-time updates directly in your pull request—keeping your entire team informed without requiring context switching or dashboard checking.
249+
250+
### Unified Progress Tracking
251+
252+
As soon as the workflow begins, KaneAI posts a comprehensive progress tracker comment to your PR. This dynamic comment serves as your single source of truth for the entire testing operation.
253+
254+
**The Progress Tracker includes:**
255+
256+
- **Current Workflow Status**: Real-time updates on which phase is currently executing
257+
- **Test Case Pipeline**: Progress through analysis, generation, authoring, and code generation phases
258+
- **Intelligent Test Case Suggestion**: AI suggests semantically similar test cases present in the project
259+
- **Test Run Management**: Execution status, including configuration, triggering, monitoring, and completion
260+
- **Reporting Status**: Final report generation and PR approval recommendation
261+
262+
This tracker automatically updates as each stage completes, providing instant visibility into the workflow without requiring any manual refreshes.
263+
264+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/2-progress-tracker.png').default} alt="KaneAI Progress Tracker" className="doc_img"/>
265+
266+
### Detailed Step Comments
267+
268+
In addition to the main progress tracker, KaneAI creates dedicated, detailed comments for each major milestone. These comments provide actionable information and direct access to relevant resources.
269+
270+
#### 1. AI-Generated Test Case Inventory
271+
272+
Once KaneAI completes test generation, a detailed comment lists every test case that was created, including:
273+
274+
- **Test Case Names**: Descriptive titles reflecting the functionality being tested
275+
- **Coverage Areas**: Which features, components, or user flows each test validates
276+
- **Authoring Status**: Real-time updates as each test case is converted into executable code
277+
- **Direct Links**: Quick access to view, edit, or customize tests in LambdaTest Test Manager
278+
279+
This comment updates dynamically as test authoring progresses, so you can monitor the transition from conceptual test cases to executable automation.
280+
281+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/3-test-cases-generated.png').default} alt="AI Generated Test Cases" className="doc_img"/>
282+
283+
#### 2. Duplicate Detection and Test Optimization
284+
285+
To prevent test redundancy and optimize your test suite, KaneAI performs semantic analysis against your existing test inventory:
286+
287+
- **Similar Test Identification**: Finds existing tests that cover similar functionality or user scenarios
288+
- **Test Suite Optimization**: Helps maintain a lean, efficient test suite by preventing duplicate coverage
289+
290+
This intelligent analysis ensures your test repository remains organized and maintainable as it grows over time.
291+
292+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/4-similar-test-cases.png').default} alt="Semantically Similar Test Cases" className="doc_img"/>
293+
294+
#### 3. Test Execution Dashboard
295+
296+
When test execution begins on HyperExecute, a dedicated comment provides:
297+
298+
- **Test Run Configuration**: Details about the execution environment, browser matrix, and parallel execution settings
299+
- **Real-Time Execution Status**: Live updates as tests run, including pass/fail counts and completion percentage
300+
- **HyperExecute Dashboard Link**: Direct access to detailed logs, screenshots, video recordings, and network traces
301+
302+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/5-test-run-created.png').default} alt="Test Run Execution" className="doc_img"/>
303+
304+
#### 4. Comprehensive Test Report with AI-Powered Insights
305+
306+
Upon completion, KaneAI generates a final report that goes far beyond simple pass/fail metrics:
307+
308+
- **Executive Summary**: High-level test coverage and success rate for quick stakeholder review
309+
- **Detailed Test Results**: Pass/fail status for each individual test case with failure details
310+
- **AI Root Cause Analysis (RCA)**: For any failures, KaneAI automatically analyzes logs, screenshots, and stack traces to identify:
311+
- The specific component or code path that failed
312+
- Potential root causes (e.g., locator changes, timing issues, data validation errors)
313+
- Recommended remediation steps
314+
- **PR Approval Recommendation**: Based on test results and failure severity, KaneAI suggests whether the PR should be approved, requires changes, or needs further investigation
315+
316+
This intelligent reporting dramatically reduces the time from test completion to actionable insights, accelerating your deployment cycles.
317+
318+
<img loading="lazy" src={require('../assets/images/kaneai-github-app/6-report-generated.png').default} alt="Final Report Generated" className="doc_img"/>
319+
320+
<!-- <img loading="lazy" src={require('../assets/images/kaneai-github-app/7-rca-for-failed-tests.png').default} alt="AI RCA for Failed Tests" className="doc_img"/> -->
321+
322+
### Benefits: Unified Visibility
323+
324+
The GitHub-native workflow provides critical advantages for enterprise teams:
325+
326+
- **Developer-Centric Experience**: All testing information lives where developers already work—no need to check external dashboards or switch contexts
327+
- **Stakeholder Transparency**: Product managers, architects, and other stakeholders can follow testing progress by simply monitoring the PR
328+
- **Audit Trail and Compliance**: Every test run, result, and AI recommendation is permanently documented in your PR history
329+
- **Deep-Dive Capability**: When detailed analysis is needed, one-click access to LambdaTest Test Manager and HyperExecute provides comprehensive diagnostics
330+
- **Asynchronous Collaboration**: Team members in different time zones can review testing status and results without requiring synchronous communication
331+

0 commit comments

Comments
 (0)