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
Copy file name to clipboardExpand all lines: docs/xcui-visual-regression.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,13 @@ XCUI (XCTest UI) is Apple's native UI testing framework used for testing iOS app
58
58
- Access to an **iOS** app (.ipa) and an **iOS Test** app (.ipa file).
59
59
- Go to [`LambdaTest SmartUI`](https://smartui.lambdatest.com/) and login along with your credentials.
60
60
61
+
:::tip Sample repo
62
+
If you do not have any **iOS** app (.ipa) and an **iOS Test** app (.ipa) file, you can run your sample tests on LambdaTest by using our sample :link:[XCUI app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/prod-ios-app.ipa) and a sample :link:[XCUI Test App](https://prod-mobile-artefacts.lambdatest.com/assets/docs/prod-ios-test-app.ipa).
63
+
64
+
Download or Clone the code sample from the LambdaTest GitHub repository to run the tests on the SmartUI.
65
+
<ahref="https://github.com/LambdaTest/lambdatest-xcui"className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
66
+
:::
67
+
61
68
## Step 1: Create a SmartUI Project
62
69
63
70
The first step is to create a project with the application in which we will combine all your **builds** run on the project.
@@ -78,28 +85,51 @@ Run the below mentioned commands in your terminal to setup the CLI and the envir
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
104
+
</CodeBlock>
97
105
</div>
98
106
99
107
</TabItem>
100
108
</Tabs>
101
109
102
-
## Step 3: Upload your Application
110
+
## Step 3: Update your App Configurations
111
+
112
+
> It should be in your app configurations then only you can perform the XCUI integration.
113
+
- Update this [dependency](https://swiftpackageindex.com/LambdaTest/lambdatest-xcui) in your test classes. You can do it as follows:
114
+
115
+
```java
116
+
importXCTest
117
+
importSmartuiXcui//importingthepackage
118
+
finalclassMyAppUITests: XCTestCase {
119
+
func testExample() throws {
120
+
// launch application
121
+
let app = XCUIApplication()
122
+
app.launch()
123
+
// take screenshot
124
+
let ltApp = LTApp()
125
+
try ltApp.screenshot(name:"screenshotName")
126
+
}
127
+
}
128
+
```
129
+
130
+
Now build your application.
131
+
132
+
## Step 4: Upload your Application
103
133
104
134
To begin testing, upload your iOS application (.ipa file) to LambdaTest's servers. You'll use our **REST API** for this process.
105
135
@@ -134,7 +164,7 @@ To begin testing, upload your iOS application (.ipa file) to LambdaTest's server
134
164
- Response of above cURL will be a **JSON** object containing the `App URL` of the format - `lt://APP123456789123456789` and will be used in the last step.
135
165
:::
136
166
137
-
## Step 4: Upload Your Test Suite
167
+
## Step 5: Upload Your Test Suite
138
168
139
169
Upload your XCUI test suite (.ipa) file to LambdaTest servers using our REST API.
0 commit comments