From c33bca22a60c27b816dd0506c1ede8b839bbc44d Mon Sep 17 00:00:00 2001 From: ShubhamSuri <70204532+surishubham@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:35:39 +0530 Subject: [PATCH 1/2] Merge pull request #1449 from amanchopra1905/stage updated the xcui and espresso doc - smartui --- docs/espresso-visual-regression.md | 13 +++++---- docs/xcui-visual-regression.md | 46 ++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 15 deletions(-) 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. From 7606eebda5f1d0e167ba961d20b8afe9320207bd Mon Sep 17 00:00:00 2001 From: ShubhamSuri <70204532+surishubham@users.noreply.github.com> Date: Fri, 28 Mar 2025 14:13:07 +0530 Subject: [PATCH 2/2] Merge pull request #1455 from amanchopra1905/stage xcui changes --- docs/xcui-visual-regression.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/xcui-visual-regression.md b/docs/xcui-visual-regression.md index 9ac45dbb8..574294da9 100644 --- a/docs/xcui-visual-regression.md +++ b/docs/xcui-visual-regression.md @@ -58,8 +58,11 @@ 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). +:::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 @@ -107,8 +110,7 @@ set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`} ## 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: +- Update this [dependency](https://swiftpackageindex.com/LambdaTest/lambdatest-xcui) in your test classes. You can do it as follows: ```java import XCTest