Skip to content

Commit f3bd9f0

Browse files
authored
Merge pull request #1096 from surishubham/main
Aman's PR 1084, 85, 88,92,95
2 parents 96a54c8 + 5b2636b commit f3bd9f0

16 files changed

+548
-163
lines changed
660 KB
Loading
1 MB
Loading
457 KB
Loading
357 KB
Loading
351 KB
Loading
39.4 KB
Loading
290 KB
Loading

docs/app-auto-network-throttling.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: app-auto-network-throttling
33
title: Network Throttling
4-
hide_title: true
4+
hide_title: false
55
sidebar_label: Network Throttling
66
description: Now validate your mobile applications over low latency networks (2G/3G/LTE) or in offline mode with varying upload and download speeds. LambdaTest empowers you to simulate these mobile network conditions through its desired capabilities, ensuring comprehensive testing of your mobile applications.
77
keywords:
@@ -50,25 +50,11 @@ import TabItem from '@theme/TabItem';
5050
})
5151
}}
5252
></script>
53-
54-
# Network Throttling
55-
56-
***
5753
In Appium testing, assessing your app's performance under diverse network conditions (2G/3G/LTE) and offline scenarios, is crucial. Fluctuating upload and download speeds can significantly impact your app's behavior across different devices.
5854

5955
LambdaTest simplifies testing by enabling simulation of diverse network conditions. Whether starting with defaults or custom profiles, these features replicate real-world scenarios, proving invaluable for Appium tests. The device maintains uninterrupted internet connectivity throughout, ensuring a reliable testing experience for your mobile applications.
6056

61-
## Objectives
62-
----
63-
64-
By the end of this guide, you will learn how to:
65-
- Initialize a test session with predefined network profiles.
66-
- Dynamically change network profiles during test execution using LambdaHooks.
67-
- Define and implement custom network profiles.
68-
- Reset the network profile to default settings.
69-
7057
## Workflow
71-
----
7258
### Initialization
7359

7460
- **Capability:** Initiate a test session with predefined network profiles using the `networkProfile` capability. Example:
@@ -137,12 +123,13 @@ To utilize the **networkProfile** capability, ensure that you include `network:
137123

138124
#### iOS
139125

140-
141126
- **LambdaHook:** You can also switch to offline mode during the test execution with the following command:
142127
```python
143128
driver.execute_script("updateNetworkProfile=offline")
144129
```
145130

131+
## Toggle Offline/Online Mode via API
132+
146133
- For both iOS and android devices you can use the offline/online mode API as well within the running test session:
147134

148135
```bash
@@ -152,7 +139,6 @@ To utilize the **networkProfile** capability, ensure that you include `network:
152139
--data '{"mode": "offline"}'
153140
```
154141

155-
156142
:::note
157143
- **Network throttling** results may vary sometimes based on multiple factors including network conditions and device performance.
158144

docs/application-setup-via-api.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
id: application-setup-via-api
3+
title: Perform Operations on your Application via API
4+
sidebar_label: via API
5+
description: This guide will explain how to perform operations with your applications via api for real and virtual devices.
6+
keywords:
7+
- appium
8+
- application operations
9+
- lambdatest
10+
- mobile testing
11+
- apis
12+
- setup application
13+
url: https://www.lambdatest.com/support/docs/application-setup-via-api/
14+
site_name: LambdaTest
15+
slug: application-setup-via-api/
16+
---
17+
18+
import Tabs from '@theme/Tabs';
19+
import TabItem from '@theme/TabItem';
20+
import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys";
21+
import CodeBlock from '@theme/CodeBlock';
22+
23+
<script type="application/ld+json"
24+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
25+
"@context": "https://schema.org",
26+
"@type": "BreadcrumbList",
27+
"itemListElement": [{
28+
"@type": "ListItem",
29+
"position": 1,
30+
"name": "Home",
31+
"item": "https://www.lambdatest.com"
32+
},{
33+
"@type": "ListItem",
34+
"position": 2,
35+
"name": "Support",
36+
"item": "https://www.lambdatest.com/support/docs/"
37+
},{
38+
"@type": "ListItem",
39+
"position": 3,
40+
"name": "Applications",
41+
"item": "https://www.lambdatest.com/support/docs/application-setup-via-api/"
42+
}]
43+
})
44+
}}
45+
></script>
46+
47+
To test your **iOS** (.ipa file) or **Android** (.apk or .aab file) application on LambdaTest, you can use our public REST APIs. In this documentation, we have listed all the operations you can perform with your application via APIs or cURL commands for both Virtual and Real Devices.
48+
49+
:::note
50+
The maximum size for application should not exceed 1GB.
51+
:::
52+
53+
:::tip
54+
- 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).
55+
:::
56+
57+
## Upload your Application
58+
59+
| PARAMETER | EXAMPLE | DESCRIPTION |
60+
|-----------------|-------------|------------|
61+
| `custom_id` | `-F "custom_id="Proverbial_1.0"` | You do not have to remember the `app_URL` and only use the `custom_id` to run your automation on the same app. |
62+
| `storage` | `-F "storage=file"` <br/> DEFAULT: `url` | Used to change the way LambdaTest stores the link. <br/> Used when we Upload using App URL |
63+
| `visibility` | `-F "visibility=team"` <br/> DEFAULT: `individual` | Used to change the visibility of the application being uploaded. Once the app is uploaded using the `team`, everyone in the organisation can use the same URL to run the tests. |
64+
65+
### Using App File
66+
67+
<div className="lambdatest__codeblock">
68+
<CodeBlock className="language-bash">
69+
{`curl -u "${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"/Users/macuser/Downloads/Appname.apk"" -F "name="appname""
70+
`}
71+
</CodeBlock>
72+
</div>
73+
74+
### Using App URL
75+
76+
<div className="lambdatest__codeblock">
77+
<CodeBlock className="language-bash">
78+
{`curl -u "${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "url=https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk" -F "name=Proverbial_App" -F "custom_id=sampleName" -F "storage=url" -F "visibility=individual"`}
79+
</CodeBlock>
80+
</div>
81+
82+
- Response of above cURL will be a **JSON** object containing the `App URL` of the format - ``lt://APP123456789123456789``
83+
84+
:::warning note
85+
The upload time of your application can range from a few seconds to a minute, depending on the size of your application. Therefore, do not interrupt the cURL command request until you receive the response.
86+
:::
87+
88+
## Fetch your Applications
89+
90+
<Tabs className="docs__val">
91+
92+
<TabItem value="android" label="Android" default>
93+
<div className="lambdatest__codeblock">
94+
<CodeBlock className="language-bash">
95+
{`curl --location --request GET "https://${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}@manual-api.lambdatest.com/app/data?type=android&level=user"`}
96+
</CodeBlock>
97+
</div>
98+
99+
</TabItem>
100+
101+
<TabItem value="ios" label="iOS" default>
102+
<div className="lambdatest__codeblock">
103+
<CodeBlock className="language-powershell">
104+
{`curl --location --request GET "https://${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}@manual-api.lambdatest.com/app/data?type=ios&level=user"`}
105+
</CodeBlock>
106+
</div>
107+
108+
</TabItem>
109+
</Tabs>
110+
111+
Shown below is the response to the above cURL request.
112+
113+
```javascript
114+
{
115+
"metaData": {
116+
"type": "ios",
117+
"total": 1
118+
},
119+
"data": [
120+
{
121+
"app_id": "APP100245789181570497850",
122+
"name": "proverbial_ios.ipa",
123+
"type": "ios",
124+
"updated_at": "2022-05-10T11:19:30.000Z",
125+
"shared": false,
126+
"source": "web-client"
127+
}
128+
]
129+
}
130+
```
131+
132+
## Deleting your Application
133+
134+
To delete your uploaded apps, run the below cURL command.
135+
136+
<div className="lambdatest__codeblock">
137+
<CodeBlock className="language-bash">
138+
{`curl --location --request DELETE "https://${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}@manual-api.lambdatest.com/app/delete" \
139+
--header 'Content-Type: application/json' \
140+
--data-raw '{
141+
"appIds" : "APPID1,APPID2"
142+
}'
143+
`}
144+
</CodeBlock>
145+
</div>
146+
147+
Shown below is the response to the above cURL request.
148+
149+
```javascript
150+
{
151+
"message": "Deleted successfully."
152+
}
153+
```
154+
155+
## Processing check for your Application
156+
157+
To unlock features such as network logs, image injection, and screenshotunblock feature for your application, app needs to undergo a processing phase. This processing takes a few minutes after the application is uploaded. You can verify if the processing is complete before running your automation script using the following API.
158+
159+
<div className="lambdatest__codeblock">
160+
<CodeBlock className="language-bash">
161+
{`curl --location --request POST 'https://mobile-api.lambdatest.com/mobile-automation/api/v1/fetchpatchedapkurl' \
162+
--header 'Authorization: Basic c2hhbnRhbnV3OkFPOEh3NHJtV2hxUlJZSVl3OEk1elMzajhCS0c2ZHl3SVBZeXNNSDJPakdtbFVheXZC' \
163+
--header 'Content-Type: application/json' \y
164+
--data-raw '{
165+
"appId": "APP10160161171698993659206876",
166+
"networkLogsEnabled": true,
167+
"imageInjectionEnabled": true,
168+
"screenshotUnblockEnabled": true
169+
}'`}
170+
</CodeBlock>
171+
</div>
172+
173+
The payload allows you to check the processing status for specific features. If the **patched_url** is empty, the processing is still in progress. To check if the processing for image injection or screenshot unblock is complete, pass either **imageInjectionEnabled** or **screenshotUnblockEnabled** as `true` based on the feature you are testing.
174+
175+
```javascript
176+
{
177+
"data": {
178+
"imageinjection_ready": false, //current processing status
179+
"patched_url": "",
180+
"screenshotunblock_ready": false, //current processing status
181+
"status": "success"
182+
},
183+
"status": "success"
184+
}
185+
```

docs/application-setup-via-gui.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
id: application-setup-via-gui
3+
title: Perform Operations on your Application via GUI
4+
sidebar_label: via GUI
5+
description: Explore how to perform operations with your applications like uploading, deleting via gui for real and virtual devices.
6+
keywords:
7+
- appium
8+
- application operations
9+
- lambdatest
10+
- mobile testing
11+
- apis
12+
- setup application
13+
url: https://www.lambdatest.com/support/docs/application-setup-via-gui/
14+
site_name: LambdaTest
15+
slug: application-setup-via-gui/
16+
---
17+
18+
import Tabs from '@theme/Tabs';
19+
import TabItem from '@theme/TabItem';
20+
import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys";
21+
import CodeBlock from '@theme/CodeBlock';
22+
import NewTag from '../src/component/newTag';
23+
24+
<script type="application/ld+json"
25+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
26+
"@context": "https://schema.org",
27+
"@type": "BreadcrumbList",
28+
"itemListElement": [{
29+
"@type": "ListItem",
30+
"position": 1,
31+
"name": "Home",
32+
"item": "https://www.lambdatest.com"
33+
},{
34+
"@type": "ListItem",
35+
"position": 2,
36+
"name": "Support",
37+
"item": "https://www.lambdatest.com/support/docs/"
38+
},{
39+
"@type": "ListItem",
40+
"position": 3,
41+
"name": "Applications",
42+
"item": "https://www.lambdatest.com/support/docs/application-setup-via-gui/"
43+
}]
44+
})
45+
}}
46+
></script>
47+
To test your iOS (.ipa file) or Android (.apk or .aab file) application on LambdaTest, you can upload them directly from the dashboard. In this documentation, we have listed the the ways via which you can upload your application for both Virtual and Real Devices.
48+
49+
## Real Device Dashboard
50+
- **Access the Dashboard :** Log in to your LambdaTest account and navigate to the [Real Device dashboard](https://applive.lambdatest.com/app).
51+
- **Initiate the Upload :** Click the Upload button in the dashboard and select your application file from your local system:
52+
- **For Android :** Ensure the file is in `.apk` or `.aab` format.
53+
- **For iOS :** Use `.ipa` format.
54+
Wait for the file to upload and process. A success message will indicate when your application is ready.
55+
- **Open App Settings :** Once uploaded, find your application in the list and click on the Settings button.
56+
- **Copy the App ID :** In the settings, locate the App ID field. Copy this ID, as it will be required to reference your app in automated tests or other configurations.
57+
58+
<img loading="lazy" src={require('../assets/images/appium-app/application/real-device-upload.gif').default} alt="Image" className="doc_img"/>
59+
60+
> Learn how to [Upload Apps on LambdaTest’s Real Device Cloud](/support/docs/upload-apps-on-real-device-cloud/) in detail.
61+
62+
## Automation Dashboard
63+
- **Access the App Automation Dashboard :** Log in to your LambdaTest account and navigate to the [App Automation Dashboard](https://appautomation.lambdatest.com/build).
64+
- **Upload the Application :** Click the Browse File button in the App tab under the Real Device or Virtual Device section. Select your application file from your local system:
65+
- **Android :** Upload a `.aab` or `.apk` file.
66+
- **iOS :** Upload an `.ipa` file.
67+
- **Copy the App URL :** After uploading, an `app_url` will be generated (format: `"lt://<app_url>"`). Copy this app_url and use it in your test scripts to identify your application.
68+
69+
<img loading="lazy" src={require('../assets/images/appium-app/application/automation-upload.gif').default} alt="Image" className="doc_img"/>

0 commit comments

Comments
 (0)