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..9ac45dbb8 100644 --- a/docs/xcui-visual-regression.md +++ b/docs/xcui-visual-regression.md @@ -58,6 +58,10 @@ 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 +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). +::: + ## 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 +82,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 +95,39 @@ 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 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 +162,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.