Skip to content

Commit f6b4c24

Browse files
updated the xcui and espresso doc - smartui
1 parent 002aabb commit f6b4c24

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

docs/espresso-visual-regression.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,23 @@ Run the below mentioned commands in your terminal to setup the CLI and the envir
8686
<Tabs className="docs__val">
8787

8888
<TabItem value="bash" label="Linux / MacOS" default>
89+
8990
<div className="lambdatest__codeblock">
90-
<CodeBlock className="language-bash">
91-
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\
91+
<CodeBlock className="language-bash">
92+
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()}
9293
export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
93-
</CodeBlock>
94+
</CodeBlock>
9495
</div>
9596

9697
</TabItem>
9798

9899
<TabItem value="powershell" label="Windows" default>
99100

100101
<div className="lambdatest__codeblock">
101-
<CodeBlock className="language-powershell">
102-
{`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \`
102+
<CodeBlock className="language-powershell">
103+
{`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()}
103104
set LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
104-
</CodeBlock>
105+
</CodeBlock>
105106
</div>
106107

107108
</TabItem>

docs/xcui-visual-regression.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ XCUI (XCTest UI) is Apple's native UI testing framework used for testing iOS app
5858
- Access to an **iOS** app (.ipa) and an **iOS Test** app (.ipa file).
5959
- Go to [`LambdaTest SmartUI`](https://smartui.lambdatest.com/) and login along with your credentials.
6060

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+
6165
## Step 1: Create a SmartUI Project
6266

6367
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
7882
<Tabs className="docs__val">
7983

8084
<TabItem value="bash" label="Linux / MacOS" default>
85+
8186
<div className="lambdatest__codeblock">
82-
<CodeBlock className="language-bash">
83-
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\
87+
<CodeBlock className="language-bash">
88+
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()}
8489
export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
85-
</CodeBlock>
90+
</CodeBlock>
8691
</div>
8792

8893
</TabItem>
8994

9095
<TabItem value="powershell" label="Windows" default>
9196

9297
<div className="lambdatest__codeblock">
93-
<CodeBlock className="language-powershell">
94-
{`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \`
95-
set LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
96-
</CodeBlock>
98+
<CodeBlock className="language-powershell">
99+
{`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
100+
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
101+
</CodeBlock>
97102
</div>
98103

99104
</TabItem>
100105
</Tabs>
101106

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+
import XCTest
115+
import SmartuiXcui // importing the package
116+
final class MyAppUITests: 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
103131

104132
To begin testing, upload your iOS application (.ipa file) to LambdaTest's servers. You'll use our **REST API** for this process.
105133

@@ -134,7 +162,7 @@ To begin testing, upload your iOS application (.ipa file) to LambdaTest's server
134162
- 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.
135163
:::
136164

137-
## Step 4: Upload Your Test Suite
165+
## Step 5: Upload Your Test Suite
138166

139167
Upload your XCUI test suite (.ipa) file to LambdaTest servers using our REST API.
140168

0 commit comments

Comments
 (0)