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
Developed by Apple, XCUITest is a framework for user-interface (UI) testing for iOS applications. It is built on top of XCTest, an integrated test framework in Apple's Xcode IDE. LambdaTest lets you perform automated app testing of your iOS apps using XCUITest across 10000+ real devices and OS combinations.
47
49
48
50
## Prerequisites
@@ -227,6 +229,11 @@ curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/x
227
229
}'
228
230
```
229
231
232
+
:::info
233
+
- For Virtual Devices, both the App file and Test-suite should be in the `Zip format`.
234
+
- We need to pass the following capability `isvirtualdevice:true` as well when we are running test for Virtual Devices.
Regular Expression or REGEX is widely used to make searching/find characters in a string.
39
42
40
43
When you run a test on LambdaTest using a specific device, there may be scenarios, in which the particular device that you selected isn’t available. In these scenarios, REGEX will help you widen the search request for devices to run the test on.
@@ -47,7 +48,7 @@ import TabItem from '@theme/TabItem';
47
48
}}
48
49
></script>
49
50
50
-
51
+
<RealDeviceTagvalue="Real Device" />
51
52
Generally the XCUI tests are run in sequence which is a time taking process. This document explains how you can speed up this process by splitting the tests into **shards**. We can divide the various tests into shards which can run parallelly and save time while running various XCUI tests.
52
53
53
54
This document will cover how to execute **XCUI Tests** on real devices with **HyperExecute**. HyperExecute is a smart test orchestration platform to run end-to-end tests at the fastest speed possible. HyperExecute is configured using a YAML file.
Usually, all the test cases of your XCUI test suite are executed, but there is a way to filter these. You can specify some selected classes or tests, which provides you with options to filter the test cases which you want to execute.
52
55
53
56
To filter the test cases, you just need to pass the suitable parameters in LambdaTest’s REST API request. Refer to the table below to understand how to use various filters provided by LambdaTest.
@@ -73,8 +76,8 @@ curl --location --request POST 'https://mobile-api.lambdatest.com/framework/v1/x
73
76
74
77
| Parameters | Description | Values | Datatype |
75
78
|----------- | ----------- | ------ | -------- |
76
-
|`only-testing`| Allows the user to run only those tests/classes provided in the list | Values can be of the following format: className or className/testName. E.g. `["Class1/Test1", "Class2"]`| Array |
77
-
|`skip-testing`| Allows the user to run all the tests/classes except the ones provided in the list | Values can be of the following format: className or className/testName. E.g. `["Class1/Test1", "Class2"]`| Array |
79
+
|`only-testing`<RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Allows the user to run only those tests/classes provided in the list | Values can be of the following format: className or className/testName. E.g. `["Class1/Test1", "Class2"]`| Array |
80
+
|`skip-testing`<RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" /> | Allows the user to run all the tests/classes except the ones provided in the list | Values can be of the following format: className or className/testName. E.g. `["Class1/Test1", "Class2"]`| Array |
78
81
79
82
:::info Note
80
83
You can not use the following filters simultaneously.
@@ -45,9 +46,8 @@ import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/co
45
46
})
46
47
}}
47
48
></script>
48
-
49
49
# XCResult on LambdaTest
50
-
50
+
<RealDeviceTagvalue="Real Device" />
51
51
Apple’s **Native XCResult Bundles (`.xcresult`)** are comprehensive test reports generated when you run XCUITest cases. These bundles include **test hierarchy, logs, stack traces, screenshots, and performance data**, which can be directly viewed in Xcode. They provide developers with rich debugging information, making it easier to analyze why a test passed or failed.
52
52
53
53
On LambdaTest, you can now **generate and download `.xcresult` bundles** for your XCUI test sessions. You can access them via the **REST API**.
@@ -47,6 +49,7 @@ import TabItem from '@theme/TabItem';
47
49
})
48
50
}}
49
51
></script>
52
+
<RealDeviceTagvalue="Real Device" />
50
53
XCTestPlan is a feature within Xcode used for building iOS, iPadOS, macOS, watchOS, tvOS, and audioOS applications. XCTestPlan helps manage how you run automated tests written with the XCTest framework.
51
54
52
55
XCTestPlan improves the organization and efficiency of running automated tests within Xcode. It allows you to create targeted test runs and manage various testing scenarios effectively.
This document provide details about the features and capabilities supported for XCUI Framework on LambdaTest.
48
50
49
51
> The capabilities listed in this document are also supported for [Virtual Devices](/support/docs/app-automation-on-emulators-simulators/)
50
52
51
53
| Capability Name | Data Type | Description |
52
54
|------|-----------|-------------|
53
-
| app | String | Enter the app id generated while uploading the app to the platform. Example:`lt://APP123456789123456789`|
54
-
| testSuite | String | Enter the test suite id generated while uploading the test suite to the platform. Example: `lt://APP123456789123456789`|
55
-
| device | String | Enter the device name and os version in `DeviceName-OSVersion` format. Example: `"device" : ["Galaxy S20-10","Pixel 3 XL-9"]`|
56
-
| video | Boolean | When you pass the `video: true`, it will generate the video for all the tests that are executed. |
57
-
| queueTimeout | Integer | Enter the time in seconds after which you want your build to timeout from queue. Example: `queueTimeout: 300`|
58
-
| idleTimeout | Integer | Enter the time in seconds for maximum running time of a test in a build. Example: `idleTimeout: 120`|
59
-
| deviceLog | Boolean | To generate the device logs, pass the value as `deviceLog: true`|
60
-
| network | String | To generate the network logs, pass the value as `network: true`. |
61
-
| build | String | To set the Espresso build name. Example: `build: My Espresso Build`. |
62
-
| geoLocation | String | Set the geolocation [country code](/support/docs/appium-ip-geolocation/#supported-ip-geolocations) if you want to enable the same in your test. Example: `geoLocation: FR`|
63
-
| gpsLocation | Decimal | The capability should be defined to override the device’s default GPS coordinates and should be provided as a comma-separated string. Example: `"location": {"lat": "-50","long": "150.028333"}`.|
64
-
| tunnel, tunnelName | Boolean | To activate the tunnel mode, pass the value as `tunnel: true` and provide the name of your tunnel as `tunnelName: NewTunnel`|
65
-
| enableBluetooth | Boolean | Used to enable the bluetooth functionality during the session. Example: `enableBluetooth: true`|
55
+
| app <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| String | Enter the app id generated while uploading the app to the platform. Example:`lt://APP123456789123456789`|
56
+
| testSuite <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| String | Enter the test suite id generated while uploading the test suite to the platform. Example: `lt://APP123456789123456789`|
57
+
| device <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| String | Enter the device name and os version in `DeviceName-OSVersion` format. Example: `"device" : ["Galaxy S20-10","Pixel 3 XL-9"]`|
58
+
| video <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Boolean | When you pass the `video: true`, it will generate the video for all the tests that are executed. |
59
+
| queueTimeout <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Integer | Enter the time in seconds after which you want your build to timeout from queue. Example: `queueTimeout: 300`|
60
+
| idleTimeout <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Integer | Enter the time in seconds for maximum running time of a test in a build. Example: `idleTimeout: 120`|
61
+
| deviceLog <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Boolean | To generate the device logs, pass the value as `deviceLog: true`|
62
+
| network <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| String | To generate the network logs, pass the value as `network: true`. |
63
+
| build <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| String | To set the Espresso build name. Example: `build: My Espresso Build`. |
64
+
| geoLocation <RealDeviceTagvalue="Real Device" />| String | Set the geolocation [country code](/support/docs/appium-ip-geolocation/#supported-ip-geolocations) if you want to enable the same in your test. Example: `geoLocation: FR`|
65
+
| gpsLocation <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Decimal | The capability should be defined to override the device’s default GPS coordinates and should be provided as a comma-separated string. Example: `"location": {"lat": "-50","long": "150.028333"}`.|
66
+
| tunnel, tunnelName <RealDeviceTagvalue="Real Device" /> <VirtualDeviceTagvalue="Virtual Device" />| Boolean | To activate the tunnel mode, pass the value as `tunnel: true` and provide the name of your tunnel as `tunnelName: NewTunnel`|
67
+
| enableBluetooth <RealDeviceTagvalue="Real Device" />| Boolean | Used to enable the bluetooth functionality during the session. Example: `enableBluetooth: true`|
66
68
| resignApp <br /> <br />Not supported in **Virtual Devices**| Boolean | Set this to `false` if you want to to prevent the apps from being re-signed. The app should be built for enterprise distribution. |
67
-
| testRemarks <br /> <br />| Boolean| Set to `true` to surface failure remarks at the top of the dashboard when a test fails. Has no effect on passing tests. **Default**: `false`. |
68
-
| retries <br /> <br /> | Integer |Defines the number of times a test should automatically retry if it fails. Maximum allowed value: 5.|
69
+
| testRemarks <br /> <br /> <RealDeviceTagvalue="Real Device" />| Boolean| Set to `true` to surface failure remarks at the top of the dashboard when a test fails. Has no effect on passing tests. **Default**: `false`. |
70
+
| retries <br /> <br /> <RealDeviceTagvalue="Real Device" />| Integer |Defines the number of times a test should automatically retry if it fails. Maximum allowed value: 5.|
69
71
70
72
:::note
71
73
Ensure that the latitude is between -90 and 90, and the longitude is between -180 and 180. Otherwise, an error will occur like "Invalid GPS location: Latitude must be between -90 and +90, Longitude must be between -180 and +180."
XML reports provide a detailed summary of test execution, allowing you to better understand your test outcomes. This document aims to guide you through the process of retrieving XML reports for XCUI tests executed on the LambdaTest platform.
48
51
49
52
> This feature is also supported for [Virtual Devices](/support/docs/app-automation-on-emulators-simulators/)
0 commit comments