diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image2.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/image2.png deleted file mode 100644 index 08c636b26..000000000 Binary files a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image2.png and /dev/null differ diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image3.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/image3.png deleted file mode 100644 index 08f12bf53..000000000 Binary files a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image3.png and /dev/null differ diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image4.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/image4.png deleted file mode 100644 index b56954c74..000000000 Binary files a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image4.png and /dev/null differ diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image5.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/image5.png deleted file mode 100644 index 0a681d3df..000000000 Binary files a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image5.png and /dev/null differ diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image6.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/image6.png deleted file mode 100644 index 88b35df10..000000000 Binary files a/assets/images/kane-ai/test-manager/test-plan-ci-cd/image6.png and /dev/null differ diff --git a/assets/images/kane-ai/test-manager/test-plan-ci-cd/step1.png b/assets/images/kane-ai/test-manager/test-plan-ci-cd/step1.png new file mode 100644 index 000000000..a853fda31 Binary files /dev/null and b/assets/images/kane-ai/test-manager/test-plan-ci-cd/step1.png differ diff --git a/docs/kaneai-ci-cd-automation.md b/docs/kaneai-ci-cd-automation.md index e3526c41d..bf4975595 100644 --- a/docs/kaneai-ci-cd-automation.md +++ b/docs/kaneai-ci-cd-automation.md @@ -1,16 +1,16 @@ --- id: kaneai-ci-cd-automation -title: Automating Test Plan Execution with CI/CD on KaneAI +title: Automating Test Runs Execution with CI/CD on KaneAI hide_title: false sidebar_label: Test Automation with CI/CD -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. +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. keywords: - lambdatest automation - lambdatest kaneai - kaneai guided walkthrough - - kane ai test plan + - kane ai test run - hyperexecute - - test plan + - test run - test manager - ci/cd - jenkins @@ -45,7 +45,7 @@ slug: kaneai-ci-cd-automation/ }) }} > -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. +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. ## Prerequisites - Access to Test Manager. @@ -55,22 +55,21 @@ This guide provides a detailed walkthrough for automating the execution of test ## Step-by-Step Guide ### Step 1: Navigate to the Test Manager - Log in to the KaneAI platform and go to the Test Manager page. -- Access the project where the test plan is located. +- Access the project where the test run is located. -Image +Image -### Step 2: Locate the 'Test Plans' Section -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. +### Step 2: Locate the 'Test Runs' Section & Copy Test run ID +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. + +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. :::tip -A list of test instances with various configurations will be displayed for each test plan. +A list of test instances with various configurations will be displayed for each test run. ::: Image -### Step 3: Copy the Test Plan ID -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. - #### Example API Call: ```yaml @@ -78,57 +77,57 @@ curl --location 'https://test-manager-api.lambdatest.com/api/atm/v1/hyperexecute --header 'Content-Type: application/json' \ --header 'Authorization: Basic ' \ --data '{ - "test_plan_id": "YOUR_TEST_PLAN_ID", #enter test plan id + "test_run_id": "YOUR_TEST_RUN_ID", #enter test run id "concurrency": 1, # Optional, Default 1 "title": "UNIQUE_BUILD_NAME", #Optional "region": "YOUR_DESIRED_REGION" #eastus, centralindia }' ``` -Image -#### Example API Response: +#### Sample API Response: + +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: + ```yaml { - "jobID": "aea5602b-abcd-1234-abcd-1234abcd1234", - "testBuildID": "01LAMBDATEST2024KANEAIJ8NPGDP", - "jobLink": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=" + "job_id": "abcd1234-abcd-1234-abcd-1234abcd1234", + "app_job_id": "abcd1234-abcd-1234-abcd-1234abcd1234", + "test_run_id": "01LAMBDATEST2024KANEAIJ8NPGDP", + "job_link": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=", + "mobile_job_link": "https://hyperexecute.lambdatest.com/hyperexecute/task?jobId=" } ``` -### Step 4: Configure the API Call -Replace `` with the actual ID from the URL and set additional optional parameters: +### Step 3: Configure the API Call +Replace `` with the actual ID from the URL and set additional optional parameters: - **Concurrency :** Defaults to 1 if not specified. - **Title :** Assign a unique job title; a random one will be generated if omitted. - **Region :** Choose a region such as eastus or centralindia. -Image - -### Step 5: Ensure Job Details Are Unique Confirm that the job title is unique to avoid conflicts. Select a region if you require a specific allocation for your devices. -:::tip Best Practice -Assign clear and descriptive titles to distinguish between jobs. -::: -Image - -### Step 6: Authenticate and Trigger the Job +### Step 4: Authenticate and Trigger the Job - Provide your LambdaTest username and access key for Basic Authentication. - Submit the API call to trigger the job. The process will start within seconds. > **Important :** Keep your credentials secure to maintain platform integrity. -Image -### Step 7: Monitor Test Executions +### Step 5: Monitor Test Executions - Follow the link provided in the API response to view the HyperExecute Job. - Monitor running executions in real time through the dashboard. Image ## Video Explanation + +:::tip +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. +::: + \ No newline at end of file +