You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Appium is a tool for automating native, mobile web, and hybrid applications on iOS, Android, and Windows platforms. It supports iOS native apps written in Objective-C or Swift and Android native apps written in Java or Kotlin. It also supports mobile web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in 'Browser' app on Android). Perform Appium automation tests on [LambdaTest's online cloud](https://www.lambdatest.com/appium-mobile-testing).*
25
+
26
+
*Learn the basics of [Appium testing on the LambdaTest platform](https://www.lambdatest.com/support/docs/getting-started-with-appium-testing/).*
Before you can start performing App automation testing with Appium, you would need to follow these steps:
9
39
@@ -12,51 +42,202 @@ Before you can start performing App automation testing with Appium, you would ne
12
42
13
43
### Clone The Sample Project
14
44
15
-
**Step-1:**Clone the LambdaTest's [LT-appium-python](https://github.com/LambdaTest/Python-UnitTest-Selenium) and navigate to the code directory as shown below:
45
+
Clone the LambdaTest’s [LT-appium-python](https://github.com/LambdaTest/Python-UnitTest-Selenium) and navigate to the code directory as shown below:
Make sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest. To obtain your access credentials, [purchase a plan](https://billing.lambdatest.com/billing/plans) or access the [Automation Dashboard](https://appautomation.lambdatest.com/).
26
55
27
-
**Step-2:**Set LambdaTest `Username` and `Access Key` in environment variables.
56
+
Set LambdaTest `Username` and `Access Key` in environment variables.
28
57
29
-
```bash
30
-
export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
58
+
**For Linux/macOS:**
59
+
60
+
```js
61
+
exportLT_USERNAME="YOUR_LAMBDATEST_USERNAME" \
31
62
exportLT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
32
63
```
64
+
65
+
**For Windows:**
33
66
67
+
```js
68
+
set LT_USERNAME="YOUR_LAMBDATEST_USERNAME"`
69
+
set LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
70
+
```
71
+
34
72
### Upload Your Application
35
73
36
74
**Step-3:** Upload your **_iOS_**application (.ipa file) or **_android_**application (.apk file) to the LambdaTest servers using our **RESTAPI**. You need to provide your **Username** and **AccessKey**in the format `Username:AccessKey`in the **cURL** command forauthentication. Make sure to add the path of the **appFile**in the cURL request. Here is an example cURL request to upload your app using our RESTAPI:
> - If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).
48
-
> - Response of above cURL will be a **JSON** object containing the `App URL` of the format - <lt://APP123456789123456789> and will be used in the next step.
87
+
**Windows:**
88
+
89
+
```js
90
+
curl -u "YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"/Users/macuser/Downloads/proverbial_android.apk""
curl -u "YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -d "{"url":"https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk","name":"sample.apk"}"
108
+
```
109
+
110
+
**Tip:**
111
+
112
+
- If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample :link: [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample :link: [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).
113
+
- Response of above cURL will be a **JSON** object containing the `App URL`of the format -<lt://APP123456789123456789> and will be used in the next step.
114
+
115
+
## Run Your First Test
116
+
117
+
Once you are done with the above-mentioned steps, you can initiate your first Python test on LambdaTest.
118
+
119
+
**Test Scenario:** Check out [Android.py](https://github.com/LambdaTest/LT-appium-python/blob/master/android.py) file to view the sample test script for android and [iOS.py](https://github.com/LambdaTest/LT-appium-python/blob/master/ios.py) for iOS.
49
120
50
-
### Executing The Tests
121
+
### Configuring Your Test Capabilities
51
122
52
-
**Step-4:** Run the following command in the directory where your project has been saved to execute your build.
123
+
You can update your custom capabilities in test scripts. Inthis sample project, we are passing platform name, platform version, device name and app url (generated earlier) along with other capabilities like build name and test name via capabilities object. The capabilities object in the sample code are defined as:
- You must add the generated **APP_URL** to the `"app"` capability in the config file.
169
+
- You can generate capabilities for your test requirements with the help of our inbuilt **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/beta/index.html)**. A more Detailed Capability Guide is available [here](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/).
170
+
171
+
## Executing The Tests
172
+
173
+
Run the following command in the directory where your project has been saved to execute your build.
174
+
175
+
<Tabs className="docs__val">
176
+
177
+
<TabItem value="ios" label="iOS" default>
53
178
54
179
```bash
55
180
python3 ios.py
56
181
```
57
182
183
+
</TabItem>
184
+
185
+
<TabItem value="android" label="Android" default>
186
+
58
187
```bash
59
188
python3 android.py
60
189
```
61
190
62
-
Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build).
191
+
</TabItem>
192
+
193
+
</Tabs>
194
+
195
+
Your test results would be displayed on the test console (or command-line interfaceif you are using terminal/cmd) and on the [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build).
196
+
197
+
## Additional Links
198
+
199
+
- [Advanced Configuration for Capabilities](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/)
200
+
- [How to test locally hosted apps](https://www.lambdatest.com/support/docs/testing-locally-hosted-pages/)
201
+
- [How to integrate LambdaTest withCI/CD](https://www.lambdatest.com/support/docs/integrations-with-ci-cd-tools/)
202
+
203
+
## Documentation & Resources :books:
204
+
205
+
Visit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.
The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎
214
+
215
+
## What's New At LambdaTest ❓
216
+
217
+
To stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/)
218
+
219
+
## About LambdaTest
220
+
221
+
[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
222
+
223
+
### Features
224
+
225
+
* Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
226
+
* Real-time cross browser testing on 3000+ environments.
227
+
* Test on Real device cloud
228
+
* Blazing fast test automation with HyperExecute
229
+
* Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
230
+
* Smart Visual Regression Testing on cloud
231
+
*120+ third-party integrations with your favorite tool forCI/CD, Project Management, Codeless Automation, and more.
232
+
* Automated Screenshot testing across multiple browsers in a single click.
233
+
* Local testing of web and mobile apps.
234
+
* Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
235
+
*Geolocation testing of web and mobile apps across 53+ countries.
236
+
*LT Browser -for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports
0 commit comments