Skip to content

Commit da859bb

Browse files
gradle integration with LT
1 parent 6ad9e59 commit da859bb

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

docs/gradle-integration-with-lambdatest.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: gradle-integration-with-lambdatest
33
title: Gradle Plugin Integration With LambdaTest
4-
hide_title: true
4+
hide_title: false
55
sidebar_label: Gradle Plugin
66
description: Automate testing at scale! Integrate LambdaTest with Gradle for seamless CI/CD & lightning-fast execution.
77
keywords:
@@ -44,11 +44,7 @@ slug: gradle-integration-with-lambdatest/
4444
})
4545
}}
4646
></script>
47-
48-
# Gradle Integration with LambdaTest
49-
***
50-
51-
Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, Kotlin, Groovy, Scala, C/C++, and JavaScript.
47+
Gradle is a build automation tool for multi-language software development. It controls the development process across various tasks, including compilation, packaging, testing, deployment, and publishing. Supported languages include Java, Kotlin, Groovy, Scala, C/C++, and JavaScript.
5248

5349
<div className="ytframe">
5450
<div className="youtube" data-embed="as5IU-UjtAg">
@@ -58,11 +54,11 @@ Gradle is a build automation tool for multi-language software development. It co
5854

5955
## Steps to Setup the Gradle Plugin
6056

61-
**Step 1:** Add LambdaTest Gradle Plugin to the `build.gradle` file.
57+
### Step 1: Add LambdaTest Gradle Plugin to the `build.gradle` file
6258

63-
```bash
59+
```java title="build.gradle"
6460
plugins {
65-
id 'io.github.lambdatest.gradle' version '1.0.5'
61+
id 'io.github.lambdatest.gradle' version '1.0.6'
6662
}
6763

6864
repositories {
@@ -72,29 +68,51 @@ repositories {
7268
}
7369
```
7470

75-
**Step 2:** Configure LambdaTest Parameters in `build.gradle`
71+
### Step 2: Configure LambdaTest Parameters in `build.gradle` file
7672

77-
```bash
73+
```java title="build.gradle"
7874
runLambdaTest {
79-
username = '<your_lambdatest_username>'
80-
accessKey = '<your_lambdatest_access_key>'
81-
appFilePath = '<path_to_your_App_File>'
82-
testSuiteFilePath = '<path_to_your_Test_Suite>'
83-
device = '<your_desired_device_for_Testing>'
84-
isFlutter = true # if you are running flutter dart tests
85-
appId = "lt://1234343" #provide this only if you have already uploaded the app
86-
testSuiteId = "lt://1223444" #provide this only if you have already uploaded the app
75+
username = 'YOUR_LAMBDATEST_USERNAME'
76+
accessKey = 'YOUR_LAMBDATEST_ACCESS_KEY>'
77+
appFilePath = 'PATH_TO_YOUR_APP_FILE'
78+
testSuiteFilePath = 'PATH_TO_YOUR_TEST_SUITE'
79+
device = 'YOUR_DESIRED_DEVICE_FOR_TESTING'
80+
isFlutter = true //if you are running flutter dart tests
81+
appId = "lt://1234343" //provide this only if you have already uploaded the app
82+
testSuiteId = "lt://1223444" //provide this only if you have already uploaded the app
8783
}
8884
```
8985

90-
## Execution
86+
### Step 3: Configure Upload APK Parameters
87+
With the release of version **`1.0.6`** of the `lambdatest-gradle-plugin`, users now have the option to upload their APK files directly to LambdaTest. Add the following configuration to build.gradle to enable APK upload:
9188

92-
To run the plugin added in the project's `build.gradle`, use the following command:
89+
```java title="build.gradle"
90+
uploadApkToLambdaTest {
91+
username = 'YOUR_LAMBDATEST_USERNAME'
92+
accessKey = 'YOUR_LAMBDATEST_ACCESS_KEY>'
93+
appFilePath = 'PATH_TO_YOUR_APP_FILE'
94+
testSuiteFilePath = 'PATH_TO_YOUR_TEST_SUITE'
95+
}
96+
```
97+
### Step 4: Execute the Plugin
98+
To run the plugin configured in build.gradle, execute the following command:
9399

94100
```bash
95101
./gradlew runLambdaTest
96102
```
97103

104+
If you only want to upload your APK files to LambdaTest, use the following command:
105+
106+
```bash
107+
./gradlew uploadApkToLambdaTest
108+
```
109+
110+
## Post Upload Configuration
111+
Once the upload process is completed, LambdaTest will return unique IDs for the uploaded files. These IDs can be used in the runLambdaTest configuration to execute your tests seamlessly.
112+
113+
## Virtual Device Support
114+
The LambdaTest Gradle plugin now supports virtual devices. To execute tests on a virtual device, set **`isVirtualDevice: true`** in both **`runLambdaTest`** and **`uploadApkToLambdaTest`** configurations. If this flag is not provided, tests will default to running on a real device.
115+
98116
## Supported Capabilities
99117

100118
The LambdaTest Gradle Plugin supports the following capabilities:

0 commit comments

Comments
 (0)