diff --git a/docs/espresso-visual-regression.md b/docs/espresso-visual-regression.md index 4c8259596..0c3a2f895 100644 --- a/docs/espresso-visual-regression.md +++ b/docs/espresso-visual-regression.md @@ -86,11 +86,12 @@ Run the below mentioned commands in your terminal to setup the CLI and the envir +
- - {`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\ + + {`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`} - +
@@ -98,10 +99,10 @@ export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
- - {`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \` + + {`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} set LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`} - +
diff --git a/docs/xcui-visual-regression.md b/docs/xcui-visual-regression.md index 5f594c9f6..574294da9 100644 --- a/docs/xcui-visual-regression.md +++ b/docs/xcui-visual-regression.md @@ -58,6 +58,13 @@ XCUI (XCTest UI) is Apple's native UI testing framework used for testing iOS app - Access to an **iOS** app (.ipa) and an **iOS Test** app (.ipa file). - Go to [`LambdaTest SmartUI`](https://smartui.lambdatest.com/) and login along with your credentials. +:::tip Sample repo +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). + +Download or Clone the code sample from the LambdaTest GitHub repository to run the tests on the SmartUI. +Image View on GitHub +::: + ## Step 1: Create a SmartUI Project The first step is to create a project with the application in which we will combine all your **builds** run on the project. @@ -78,11 +85,12 @@ Run the below mentioned commands in your terminal to setup the CLI and the envir +
- - {`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\ + + {`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`} - +
@@ -90,16 +98,38 @@ export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
- - {`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \` -set LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`} - + + {`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}" +set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`} +
-## Step 3: Upload your Application +## Step 3: Update your App Configurations + +> It should be in your app configurations then only you can perform the XCUI integration. +- Update this [dependency](https://swiftpackageindex.com/LambdaTest/lambdatest-xcui) in your test classes. You can do it as follows: + +```java +import XCTest +import SmartuiXcui // importing the package +final class MyAppUITests: XCTestCase { + func testExample() throws { + // launch application + let app = XCUIApplication() + app.launch() + // take screenshot + let ltApp = LTApp() + try ltApp.screenshot(name: "screenshotName") + } +} +``` + +Now build your application. + +## Step 4: Upload your Application To begin testing, upload your iOS application (.ipa file) to LambdaTest's servers. You'll use our **REST API** for this process. @@ -134,7 +164,7 @@ To begin testing, upload your iOS application (.ipa file) to LambdaTest's server - 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. ::: -## Step 4: Upload Your Test Suite +## Step 5: Upload Your Test Suite Upload your XCUI test suite (.ipa) file to LambdaTest servers using our REST API.