Skip to content

Commit eedd701

Browse files
authored
Merge pull request #1189 from Private1647/stage
Updated CICD doc
2 parents 05f5c0b + 1b4c049 commit eedd701

File tree

7 files changed

+32
-33
lines changed

7 files changed

+32
-33
lines changed
-101 KB
Binary file not shown.
-97.4 KB
Binary file not shown.
-98 KB
Binary file not shown.
-97.9 KB
Binary file not shown.
-105 KB
Binary file not shown.
116 KB
Loading

docs/kaneai-ci-cd-automation.md

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
id: kaneai-ci-cd-automation
3-
title: Automating Test Plan Execution with CI/CD on KaneAI
3+
title: Automating Test Runs Execution with CI/CD on KaneAI
44
hide_title: false
55
sidebar_label: Test Automation with CI/CD
6-
description: Automate test plan execution on KaneAI with CI/CD tools like GitHub Actions and Jenkins. Follow our step-by-step guide for seamless integration.
6+
description: Automate test run execution on KaneAI with CI/CD tools like GitHub Actions and Jenkins. Follow our step-by-step guide for seamless integration.
77
keywords:
88
- lambdatest automation
99
- lambdatest kaneai
1010
- kaneai guided walkthrough
11-
- kane ai test plan
11+
- kane ai test run
1212
- hyperexecute
13-
- test plan
13+
- test run
1414
- test manager
1515
- ci/cd
1616
- jenkins
@@ -45,7 +45,7 @@ slug: kaneai-ci-cd-automation/
4545
})
4646
}}
4747
></script>
48-
This guide provides a detailed walkthrough for automating the execution of test plans using CI/CD tools such as GitHub Actions or Jenkins on the KaneAI platform. By following these steps, you can effortlessly integrate test plan executions with your pipelines.
48+
This guide provides a detailed walkthrough for automating the execution of test runs using CI/CD tools such as GitHub Actions or Jenkins on the KaneAI platform. By following these steps, you can effortlessly integrate test run executions with your pipelines.
4949

5050
## Prerequisites
5151
- Access to Test Manager.
@@ -55,80 +55,79 @@ This guide provides a detailed walkthrough for automating the execution of test
5555
## Step-by-Step Guide
5656
### Step 1: Navigate to the Test Manager
5757
- Log in to the KaneAI platform and go to the Test Manager page.
58-
- Access the project where the test plan is located.
58+
- Access the project where the test run is located.
5959

60-
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image1.png').default} alt="Image" className="doc_img"/>
60+
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/step1.png').default} alt="Image" className="doc_img"/>
6161

62-
### Step 2: Locate the 'Test Plans' Section
63-
Inside your selected project, navigate to the Test Plans section. Select the desired test plan for integration or direct triggering from your CI/CD pipeline.
62+
### Step 2: Locate the 'Test Runs' Section & Copy Test run ID
63+
Inside your selected project, navigate to the Test Runs section. Select the desired test run for integration or direct triggering from your CI/CD pipeline.
64+
65+
Open the test run to view its URL. Copy the Test Run ID from the URL. This ID will be used in the API call for integration.
6466

6567
:::tip
66-
A list of test instances with various configurations will be displayed for each test plan.
68+
A list of test instances with various configurations will be displayed for each test run.
6769
:::
6870

6971
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image2.png').default} alt="Image" className="doc_img"/>
7072

71-
### Step 3: Copy the Test Plan ID
72-
Open the test plan to view its URL. Copy the Test Plan ID from the URL. This ID will be used in the API call for integration.
73-
7473
#### Example API Call:
7574

7675
```yaml
7776
curl --location 'https://test-manager-api.lambdatest.com/api/atm/v1/hyperexecute' \
7877
--header 'Content-Type: application/json' \
7978
--header 'Authorization: Basic <Base64Auth>' \
8079
--data '{
81-
"test_plan_id": "YOUR_TEST_PLAN_ID", #enter test plan id
80+
"test_run_id": "YOUR_TEST_RUN_ID", #enter test run id
8281
"concurrency": 1, # Optional, Default 1
8382
"title": "UNIQUE_BUILD_NAME", #Optional
8483
"region": "YOUR_DESIRED_REGION" #eastus, centralindia
8584
}'
8685
```
8786

88-
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image3.png').default} alt="Image" className="doc_img"/>
8987

90-
#### Example API Response:
88+
#### Sample API Response:
89+
90+
The API response contains the job ID for both jobs created for desktop web tests as well as mobile tests on real devices. Here is a sample response for a test run which contains both app and web test cases:
91+
9192
```yaml
9293
{
93-
"jobID": "aea5602b-abcd-1234-abcd-1234abcd1234",
94-
"testBuildID": "01LAMBDATEST2024KANEAIJ8NPGDP",
95-
"jobLink": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=<job-id>"
94+
"job_id": "abcd1234-abcd-1234-abcd-1234abcd1234",
95+
"app_job_id": "abcd1234-abcd-1234-abcd-1234abcd1234",
96+
"test_run_id": "01LAMBDATEST2024KANEAIJ8NPGDP",
97+
"job_link": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=<job_id>",
98+
"mobile_job_link": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=<app_job_id>"
9699
}
97100
```
98101

99-
### Step 4: Configure the API Call
100-
Replace `<TestPlanID>` with the actual ID from the URL and set additional optional parameters:
102+
### Step 3: Configure the API Call
103+
Replace `<TestRunID>` with the actual ID from the URL and set additional optional parameters:
101104

102105
- **Concurrency :** Defaults to 1 if not specified.
103106
- **Title :** Assign a unique job title; a random one will be generated if omitted.
104107
- **Region :** Choose a region such as eastus or centralindia.
105108

106-
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image4.png').default} alt="Image" className="doc_img"/>
107-
108-
### Step 5: Ensure Job Details Are Unique
109109
Confirm that the job title is unique to avoid conflicts. Select a region if you require a specific allocation for your devices.
110110

111-
:::tip Best Practice
112-
Assign clear and descriptive titles to distinguish between jobs.
113-
:::
114111

115-
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image5.png').default} alt="Image" className="doc_img"/>
116-
117-
### Step 6: Authenticate and Trigger the Job
112+
### Step 4: Authenticate and Trigger the Job
118113
- Provide your LambdaTest username and access key for Basic Authentication.
119114
- Submit the API call to trigger the job. The process will start within seconds.
120115

121116
> **Important :** Keep your credentials secure to maintain platform integrity.
122117
123-
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image6.png').default} alt="Image" className="doc_img"/>
124118

125-
### Step 7: Monitor Test Executions
119+
### Step 5: Monitor Test Executions
126120
- Follow the link provided in the API response to view the HyperExecute Job.
127121
- Monitor running executions in real time through the dashboard.
128122

129123
<img loading="lazy" src={require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/image7.png').default} alt="Image" className="doc_img"/>
130124

131125
## Video Explanation
126+
127+
:::tip
128+
The video consists of old configuration with Test Plans and Builds instead of Test Runs. Please keep this in mind while going through the video. The video will be updated soon.
129+
:::
130+
132131
<video class="right-side" width="100%" controls id="vid">
133132
<source src= {require('../assets/images/kane-ai/test-manager/test-plan-ci-cd/output.mp4').default} type="video/mp4" />
134-
</video>
133+
</video>

0 commit comments

Comments
 (0)