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
+37-9Lines changed: 37 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,10 @@ 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
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:[iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/prod-ios-app.ipa) and a sample :link:[iOS Test](https://prod-mobile-artefacts.lambdatest.com/assets/docs/prod-ios-test-app.ipa).
63
+
:::
64
+
61
65
## Step 1: Create a SmartUI Project
62
66
63
67
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 +82,52 @@ Run the below mentioned commands in your terminal to setup the CLI and the envir
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
101
+
</CodeBlock>
97
102
</div>
98
103
99
104
</TabItem>
100
105
</Tabs>
101
106
102
-
## Step 3: Upload your Application
107
+
## Step 3: Update your App Configurations
108
+
109
+
> It should be in your app configurations then only you can perform the XCUI integration.
110
+
111
+
- Update this dependency in your test classes. You can do it as follows:
112
+
113
+
```java
114
+
importXCTest
115
+
importSmartuiXcui//importingthepackage
116
+
finalclassMyAppUITests: XCTestCase {
117
+
func testExample() throws {
118
+
// launch application
119
+
let app = XCUIApplication()
120
+
app.launch()
121
+
// take screenshot
122
+
let ltApp = LTApp()
123
+
try ltApp.screenshot(name:"screenshotName")
124
+
}
125
+
}
126
+
```
127
+
128
+
Now build your application.
129
+
130
+
## Step 4: Upload your Application
103
131
104
132
To begin testing, upload your iOS application (.ipa file) to LambdaTest's servers. You'll use our **REST API** for this process.
105
133
@@ -134,7 +162,7 @@ To begin testing, upload your iOS application (.ipa file) to LambdaTest's server
134
162
- 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
163
:::
136
164
137
-
## Step 4: Upload Your Test Suite
165
+
## Step 5: Upload Your Test Suite
138
166
139
167
Upload your XCUI test suite (.ipa) file to LambdaTest servers using our REST API.
0 commit comments