Skip to content

Commit 91e9a6d

Browse files
authored
Merge pull request #1468 from surishubham/main
Stage PRs- 1449, 55
2 parents 1c7a352 + 7606eeb commit 91e9a6d

File tree

2 files changed

+46
-15
lines changed

2 files changed

+46
-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: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ 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 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+
<a href="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+
6168
## Step 1: Create a SmartUI Project
6269

6370
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
7885
<Tabs className="docs__val">
7986

8087
<TabItem value="bash" label="Linux / MacOS" default>
88+
8189
<div className="lambdatest__codeblock">
82-
<CodeBlock className="language-bash">
83-
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\
90+
<CodeBlock className="language-bash">
91+
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()}
8492
export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
85-
</CodeBlock>
93+
</CodeBlock>
8694
</div>
8795

8896
</TabItem>
8997

9098
<TabItem value="powershell" label="Windows" default>
9199

92100
<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>
101+
<CodeBlock className="language-powershell">
102+
{`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
103+
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
104+
</CodeBlock>
97105
</div>
98106

99107
</TabItem>
100108
</Tabs>
101109

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+
import XCTest
117+
import SmartuiXcui // importing the package
118+
final class MyAppUITests: 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
103133

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

@@ -134,7 +164,7 @@ To begin testing, upload your iOS application (.ipa file) to LambdaTest's server
134164
- 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.
135165
:::
136166

137-
## Step 4: Upload Your Test Suite
167+
## Step 5: Upload Your Test Suite
138168

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

0 commit comments

Comments
 (0)