From 9335c12625d61f1a0be55d6edd635ee565bfe245 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Thu, 21 Nov 2024 23:51:28 +0530 Subject: [PATCH 01/16] change docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffae88861..acd97fd1b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ![Patrol promotial graphics][promo_graphics] -Simple yet powerful Flutter-first UI testing framework overcoming limitations of +Simple ye powerful Flutter-first UI testing framework overcoming limitations of `flutter_test`, `integration_test`, and `flutter_driver`. Created and supported by [LeanCode](https://leancode.co). From 7156080a64241c9e0f82bf4def15e67e714881e8 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Fri, 22 Nov 2024 00:02:57 +0530 Subject: [PATCH 02/16] chnages revert --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index acd97fd1b..ffae88861 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ![Patrol promotial graphics][promo_graphics] -Simple ye powerful Flutter-first UI testing framework overcoming limitations of +Simple yet powerful Flutter-first UI testing framework overcoming limitations of `flutter_test`, `integration_test`, and `flutter_driver`. Created and supported by [LeanCode](https://leancode.co). From 9ddff08cb7d50abdbc2af35c3396e7b6789f9388 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Fri, 22 Nov 2024 00:56:24 +0530 Subject: [PATCH 03/16] added lambdatest runner --- .../src/main/LambdatestPatrolJUnitRunner.java | 54 +++++++++++++++++++ .../patrol/example/android/app/build.gradle | 10 +++- .../patrol/example/MainActivityTest.java | 6 ++- .../patrol/example/android/gradle.properties | 2 +- .../patrol/example/android/settings.gradle | 2 +- 5 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java diff --git a/packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java b/packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java new file mode 100644 index 000000000..8ea819599 --- /dev/null +++ b/packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java @@ -0,0 +1,54 @@ +package pl.leancode.patrol; + +import android.util.Log; +import pl.leancode.patrol.contracts.PatrolAppServiceClientException; + +import java.net.Inet4Address; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.Enumeration; +import java.util.Objects; + +public class LambdatestPatrolJUnitRunner extends PatrolJUnitRunner { + @Override + public PatrolAppServiceClient createAppServiceClient() { + // Create client with a default constructor (localhost:8082) by default. + PatrolAppServiceClient client = new PatrolAppServiceClient(); + waitForPatrolAppService(); + + try { + client.listDartTests(); + + //TODO verify in a project where we use Browserstack + } catch (PatrolAppServiceClientException ex) { + ex.printStackTrace(); + // If the client on localhost:8082 fails, let's apply the wokraround + Logger.INSTANCE.i("PatrolAppServiceClientException in createAppServiceClient " + ex.getMessage()); + Logger.INSTANCE.i("LOOPBACK: " + getLoopback()); + client = new PatrolAppServiceClient(getLoopback()); + } + + return client; + } + + public String getLoopback() { + try { + Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); + while (interfaces.hasMoreElements()) { + NetworkInterface i = interfaces.nextElement(); + Log.d("LOOPBACK", i.getDisplayName()); + if (Objects.equals(i.getDisplayName(), "tun0")) { + for (java.net.InterfaceAddress a : i.getInterfaceAddresses()) { + if (a.getAddress() instanceof Inet4Address) { + return a.getAddress().toString().substring(1); + } + } + } + + } + } catch (SocketException e) { + } + + return null; + } +} diff --git a/packages/patrol/example/android/app/build.gradle b/packages/patrol/example/android/app/build.gradle index 05f6330e5..f84f52421 100644 --- a/packages/patrol/example/android/app/build.gradle +++ b/packages/patrol/example/android/app/build.gradle @@ -25,7 +25,7 @@ if (flutterVersionName == null) { android { compileSdkVersion 34 - ndkVersion flutter.ndkVersion + ndkVersion = "25.1.8937393" namespace "pl.leancode.patrol.example" @@ -46,6 +46,7 @@ android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 + coreLibraryDesugaringEnabled true } kotlinOptions { @@ -62,7 +63,7 @@ android { targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" + testInstrumentationRunner "pl.leancode.patrol.LambdatestPatrolJUnitRunner" testInstrumentationRunnerArguments clearPackageData: "true" } @@ -82,5 +83,10 @@ flutter { } dependencies { +<<<<<<< HEAD androidTestUtil 'androidx.test:orchestrator:1.5.1' +======= + androidTestUtil 'androidx.test:orchestrator:1.4.2' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' +>>>>>>> 5b5065d5 (added lambdatest runner) } diff --git a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java index 675e46464..90f22cf97 100644 --- a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java +++ b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java @@ -6,12 +6,14 @@ import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import pl.leancode.patrol.PatrolJUnitRunner; +import pl.leancode.patrol.LambdatestPatrolJUnitRunner; + @RunWith(Parameterized.class) public class MainActivityTest { @Parameters(name = "{0}") public static Object[] testCases() { - PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); + LambdatestPatrolJUnitRunner instrumentation = (LambdatestPatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); instrumentation.setUp(MainActivity.class); instrumentation.waitForPatrolAppService(); return instrumentation.listDartTests(); @@ -25,7 +27,7 @@ public MainActivityTest(String dartTestName) { @Test public void runDartTest() { - PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); + LambdatestPatrolJUnitRunner instrumentation = (LambdatestPatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); instrumentation.runDartTest(dartTestName); } } diff --git a/packages/patrol/example/android/gradle.properties b/packages/patrol/example/android/gradle.properties index 94adc3a3f..7ae58a921 100644 --- a/packages/patrol/example/android/gradle.properties +++ b/packages/patrol/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 android.useAndroidX=true android.enableJetifier=true diff --git a/packages/patrol/example/android/settings.gradle b/packages/patrol/example/android/settings.gradle index f08a60d92..8739f2403 100644 --- a/packages/patrol/example/android/settings.gradle +++ b/packages/patrol/example/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" - id "com.android.application" version "8.1.2" apply false + id "com.android.application" version "8.3.2" apply false id "com.google.gms.google-services" version "4.4.0" apply false id "org.jetbrains.kotlin.android" version "1.9.20" apply false } From ca0831056d56df150bea5f0c38f8efe32167f803 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Fri, 22 Nov 2024 01:41:40 +0530 Subject: [PATCH 04/16] added LambdaTest Runner --- .../pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/patrol/android/src/main/{LambdatestPatrolJUnitRunner.java => kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java} (100%) diff --git a/packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java similarity index 100% rename from packages/patrol/android/src/main/LambdatestPatrolJUnitRunner.java rename to packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java From fc516e9ee54e728bf07ca67ab89dfd94e4bd1404 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Fri, 22 Nov 2024 02:33:35 +0530 Subject: [PATCH 05/16] changes comments --- .../kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java index 8ea819599..87e984b8f 100644 --- a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java +++ b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java @@ -19,7 +19,7 @@ public PatrolAppServiceClient createAppServiceClient() { try { client.listDartTests(); - //TODO verify in a project where we use Browserstack + //TODO verify in a project where we use LambdaTest } catch (PatrolAppServiceClientException ex) { ex.printStackTrace(); // If the client on localhost:8082 fails, let's apply the wokraround From 63a31bac074a2d02a5fb91180708bf55f63b6683 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Fri, 22 Nov 2024 15:27:06 +0530 Subject: [PATCH 06/16] changes for lambdatest runner --- packages/patrol/example/android/app/build.gradle | 10 ++-------- .../pl/leancode/patrol/example/MainActivityTest.java | 8 +++----- packages/patrol/example/android/gradle.properties | 4 ++-- packages/patrol/example/android/settings.gradle | 4 ++-- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/patrol/example/android/app/build.gradle b/packages/patrol/example/android/app/build.gradle index f84f52421..05f6330e5 100644 --- a/packages/patrol/example/android/app/build.gradle +++ b/packages/patrol/example/android/app/build.gradle @@ -25,7 +25,7 @@ if (flutterVersionName == null) { android { compileSdkVersion 34 - ndkVersion = "25.1.8937393" + ndkVersion flutter.ndkVersion namespace "pl.leancode.patrol.example" @@ -46,7 +46,6 @@ android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 - coreLibraryDesugaringEnabled true } kotlinOptions { @@ -63,7 +62,7 @@ android { targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "pl.leancode.patrol.LambdatestPatrolJUnitRunner" + testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner" testInstrumentationRunnerArguments clearPackageData: "true" } @@ -83,10 +82,5 @@ flutter { } dependencies { -<<<<<<< HEAD androidTestUtil 'androidx.test:orchestrator:1.5.1' -======= - androidTestUtil 'androidx.test:orchestrator:1.4.2' - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' ->>>>>>> 5b5065d5 (added lambdatest runner) } diff --git a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java index 90f22cf97..bb226cd27 100644 --- a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java +++ b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java @@ -6,14 +6,12 @@ import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import pl.leancode.patrol.PatrolJUnitRunner; -import pl.leancode.patrol.LambdatestPatrolJUnitRunner; - @RunWith(Parameterized.class) public class MainActivityTest { @Parameters(name = "{0}") public static Object[] testCases() { - LambdatestPatrolJUnitRunner instrumentation = (LambdatestPatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); + PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); instrumentation.setUp(MainActivity.class); instrumentation.waitForPatrolAppService(); return instrumentation.listDartTests(); @@ -27,7 +25,7 @@ public MainActivityTest(String dartTestName) { @Test public void runDartTest() { - LambdatestPatrolJUnitRunner instrumentation = (LambdatestPatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); + PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); instrumentation.runDartTest(dartTestName); } -} +} \ No newline at end of file diff --git a/packages/patrol/example/android/gradle.properties b/packages/patrol/example/android/gradle.properties index 7ae58a921..4d3226abc 100644 --- a/packages/patrol/example/android/gradle.properties +++ b/packages/patrol/example/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true -android.enableJetifier=true +android.enableJetifier=true \ No newline at end of file diff --git a/packages/patrol/example/android/settings.gradle b/packages/patrol/example/android/settings.gradle index 8739f2403..9cafdad20 100644 --- a/packages/patrol/example/android/settings.gradle +++ b/packages/patrol/example/android/settings.gradle @@ -19,9 +19,9 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" - id "com.android.application" version "8.3.2" apply false + id "com.android.application" version "8.1.2" apply false id "com.google.gms.google-services" version "4.4.0" apply false id "org.jetbrains.kotlin.android" version "1.9.20" apply false } -include ":app" +include ":app" \ No newline at end of file From 2be05e8c5bd926d33d28c0a08750304ace4344e8 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Wed, 27 Nov 2024 23:40:13 +0530 Subject: [PATCH 07/16] removed TODO --- .../pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java index 87e984b8f..a4837584f 100644 --- a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java +++ b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/LambdaTestPatrolJUnitRunner.java @@ -9,7 +9,7 @@ import java.util.Enumeration; import java.util.Objects; -public class LambdatestPatrolJUnitRunner extends PatrolJUnitRunner { +public class LambdaTestPatrolJUnitRunner extends PatrolJUnitRunner { @Override public PatrolAppServiceClient createAppServiceClient() { // Create client with a default constructor (localhost:8082) by default. @@ -18,8 +18,6 @@ public PatrolAppServiceClient createAppServiceClient() { try { client.listDartTests(); - - //TODO verify in a project where we use LambdaTest } catch (PatrolAppServiceClientException ex) { ex.printStackTrace(); // If the client on localhost:8082 fails, let's apply the wokraround From 87899d1abaf4152ed1db358c99b23c853aa01bb9 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Wed, 4 Dec 2024 18:10:30 +0530 Subject: [PATCH 08/16] added the LT Doc --- docs/integrations/Lambdatest.mdx | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 docs/integrations/Lambdatest.mdx diff --git a/docs/integrations/Lambdatest.mdx b/docs/integrations/Lambdatest.mdx new file mode 100644 index 000000000..7236fb8d0 --- /dev/null +++ b/docs/integrations/Lambdatest.mdx @@ -0,0 +1,67 @@ +--- +title: Integrations - LambdaTest +--- + +# Lambdatest overview + +[Lambdatest App Automate] is a popular cloud device farm. + +This integration is currently Android-only. + +### Change runner + +Modify the **app-level build.gradle**: + +```groovy title="android/app/build.gradle" +android { + // ... + defaultConfig { + //... + testInstrumentationRunner "pl.leancode.patrol.LambdaTestPatrolJUnitRunner" + } + // ... +} + +// ... +``` + +That's all! + +### Upload to Lambdatest + +To run Android UI tests on Lambdatest: + +1. Upload the app under test APK to Lambdatest ([see docs][LT_app_docs]) +1. Upload the instrumentation app APK to Lambdatest ([see docs][LT_test_docs]) +1. Start test execution on Lambdatest ([see docs][LT_execute_docs]) + + + + + +``` +$ export LAMBDATEST_PROJECT=AwesomeApp # optional +$ export LAMBDATEST_DEVICES="[\"Pixel 7 Pro-13\"]" # optional +• Building apk with entrypoint test_bundle.dart... +✓ Completed building apk with entrypoint test_bundle.dart (11.0s) + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed +100 87.4M 100 235 100 87.4M 7 2857k 0:00:33 0:00:31 0:00:02 2052k +Uploaded app, "app_id": "lt://APP1016047291733313441063634", +Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", +{ + "status": [ + "Success" + ], + "buildId": [ + "5875687" + ], + "message": [ + "" + ] +} + + +[LT_app_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-2-upload-your-application +[LT_test_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-3-uploading-test-suite +[LT_execute_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-4-executing-the-test From 064effc5cc64ebb6811784c819f94e00adfa5462 Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Wed, 4 Dec 2024 19:44:10 +0530 Subject: [PATCH 09/16] added the LT Doc --- docs/integrations/Lambdatest.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/integrations/Lambdatest.mdx b/docs/integrations/Lambdatest.mdx index 7236fb8d0..341394b02 100644 --- a/docs/integrations/Lambdatest.mdx +++ b/docs/integrations/Lambdatest.mdx @@ -4,7 +4,7 @@ title: Integrations - LambdaTest # Lambdatest overview -[Lambdatest App Automate] is a popular cloud device farm. +[LambdaTest App Test Automation] is a popular cloud device farm. This integration is currently Android-only. @@ -60,8 +60,9 @@ Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", "" ] } - +``` [LT_app_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-2-upload-your-application [LT_test_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-3-uploading-test-suite [LT_execute_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-4-executing-the-test +[LambdaTest App Test Automation]: https://www.lambdatest.com/app-test-automation \ No newline at end of file From b5e13a9715b66824d29ff78b2ec4af54e12000fe Mon Sep 17 00:00:00 2001 From: Gauravpandeyr Date: Wed, 4 Dec 2024 19:55:18 +0530 Subject: [PATCH 10/16] added the LT Doc --- docs/integrations/Lambdatest.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/Lambdatest.mdx b/docs/integrations/Lambdatest.mdx index 341394b02..57f27cfac 100644 --- a/docs/integrations/Lambdatest.mdx +++ b/docs/integrations/Lambdatest.mdx @@ -46,7 +46,7 @@ $ export LAMBDATEST_DEVICES="[\"Pixel 7 Pro-13\"]" # optional ✓ Completed building apk with entrypoint test_bundle.dart (11.0s) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed -100 87.4M 100 235 100 87.4M 7 2857k 0:00:33 0:00:31 0:00:02 2052k +100 82.4M 100 255 100 82.4M 7 2897k 0:00:31 0:00:36 0:00:02 2051k Uploaded app, "app_id": "lt://APP1016047291733313441063634", Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", { From 905e0877f2ffabccbe620c0c7fe2878e06d129f0 Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 11:49:37 +0100 Subject: [PATCH 11/16] Fix newlines and typos --- docs/integrations/Lambdatest.mdx | 12 ++++++------ .../pl/leancode/patrol/example/MainActivityTest.java | 2 +- packages/patrol/example/android/gradle.properties | 2 +- packages/patrol/example/android/settings.gradle | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/integrations/Lambdatest.mdx b/docs/integrations/Lambdatest.mdx index 57f27cfac..22485c88d 100644 --- a/docs/integrations/Lambdatest.mdx +++ b/docs/integrations/Lambdatest.mdx @@ -2,7 +2,7 @@ title: Integrations - LambdaTest --- -# Lambdatest overview +# LambdaTest overview [LambdaTest App Test Automation] is a popular cloud device farm. @@ -27,13 +27,13 @@ android { That's all! -### Upload to Lambdatest +### Upload to LambdaTest -To run Android UI tests on Lambdatest: +To run Android UI tests on LambdaTest: -1. Upload the app under test APK to Lambdatest ([see docs][LT_app_docs]) -1. Upload the instrumentation app APK to Lambdatest ([see docs][LT_test_docs]) -1. Start test execution on Lambdatest ([see docs][LT_execute_docs]) +1. Upload the app under test APK to LambdaTest ([see docs][LT_app_docs]) +1. Upload the instrumentation app APK to LambdaTest ([see docs][LT_test_docs]) +1. Start test execution on LambdaTest ([see docs][LT_execute_docs]) diff --git a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java index bb226cd27..675e46464 100644 --- a/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java +++ b/packages/patrol/example/android/app/src/androidTest/java/pl/leancode/patrol/example/MainActivityTest.java @@ -28,4 +28,4 @@ public void runDartTest() { PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation(); instrumentation.runDartTest(dartTestName); } -} \ No newline at end of file +} diff --git a/packages/patrol/example/android/gradle.properties b/packages/patrol/example/android/gradle.properties index 4d3226abc..94adc3a3f 100644 --- a/packages/patrol/example/android/gradle.properties +++ b/packages/patrol/example/android/gradle.properties @@ -1,3 +1,3 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file +android.enableJetifier=true diff --git a/packages/patrol/example/android/settings.gradle b/packages/patrol/example/android/settings.gradle index 9cafdad20..f08a60d92 100644 --- a/packages/patrol/example/android/settings.gradle +++ b/packages/patrol/example/android/settings.gradle @@ -24,4 +24,4 @@ plugins { id "org.jetbrains.kotlin.android" version "1.9.20" apply false } -include ":app" \ No newline at end of file +include ":app" From 8f8a95b1bcc164bd200057b4136ea68668fb785e Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 12:02:21 +0100 Subject: [PATCH 12/16] Rename Lambdatest.mdx to lambdatest.mdx --- docs/integrations/{Lambdatest.mdx => lambdatest.mdx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/integrations/{Lambdatest.mdx => lambdatest.mdx} (100%) diff --git a/docs/integrations/Lambdatest.mdx b/docs/integrations/lambdatest.mdx similarity index 100% rename from docs/integrations/Lambdatest.mdx rename to docs/integrations/lambdatest.mdx From a1e042c30c1a04b311723b4eadd43fb4a649a6f4 Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 12:07:56 +0100 Subject: [PATCH 13/16] Add docs redirects and navigation --- docs.json | 4 ++ .../documentation/integrations/lambdatest.mdx | 68 +++++++++++++++++++ docs/integrations/lambdatest.mdx | 68 +------------------ 3 files changed, 74 insertions(+), 66 deletions(-) create mode 100644 docs/documentation/integrations/lambdatest.mdx diff --git a/docs.json b/docs.json index 62e674bcf..f638a03cb 100644 --- a/docs.json +++ b/docs.json @@ -195,6 +195,10 @@ { "title": "Browserstack", "href": "/documentation/integrations/browserstack" + }, + { + "title": "LambdaTest", + "href": "/documentation/integrations/lambdatest" } ] }, diff --git a/docs/documentation/integrations/lambdatest.mdx b/docs/documentation/integrations/lambdatest.mdx new file mode 100644 index 000000000..22485c88d --- /dev/null +++ b/docs/documentation/integrations/lambdatest.mdx @@ -0,0 +1,68 @@ +--- +title: Integrations - LambdaTest +--- + +# LambdaTest overview + +[LambdaTest App Test Automation] is a popular cloud device farm. + +This integration is currently Android-only. + +### Change runner + +Modify the **app-level build.gradle**: + +```groovy title="android/app/build.gradle" +android { + // ... + defaultConfig { + //... + testInstrumentationRunner "pl.leancode.patrol.LambdaTestPatrolJUnitRunner" + } + // ... +} + +// ... +``` + +That's all! + +### Upload to LambdaTest + +To run Android UI tests on LambdaTest: + +1. Upload the app under test APK to LambdaTest ([see docs][LT_app_docs]) +1. Upload the instrumentation app APK to LambdaTest ([see docs][LT_test_docs]) +1. Start test execution on LambdaTest ([see docs][LT_execute_docs]) + + + + + +``` +$ export LAMBDATEST_PROJECT=AwesomeApp # optional +$ export LAMBDATEST_DEVICES="[\"Pixel 7 Pro-13\"]" # optional +• Building apk with entrypoint test_bundle.dart... +✓ Completed building apk with entrypoint test_bundle.dart (11.0s) + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed +100 82.4M 100 255 100 82.4M 7 2897k 0:00:31 0:00:36 0:00:02 2051k +Uploaded app, "app_id": "lt://APP1016047291733313441063634", +Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", +{ + "status": [ + "Success" + ], + "buildId": [ + "5875687" + ], + "message": [ + "" + ] +} +``` + +[LT_app_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-2-upload-your-application +[LT_test_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-3-uploading-test-suite +[LT_execute_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-4-executing-the-test +[LambdaTest App Test Automation]: https://www.lambdatest.com/app-test-automation \ No newline at end of file diff --git a/docs/integrations/lambdatest.mdx b/docs/integrations/lambdatest.mdx index 22485c88d..6347fb0f5 100644 --- a/docs/integrations/lambdatest.mdx +++ b/docs/integrations/lambdatest.mdx @@ -1,68 +1,4 @@ --- title: Integrations - LambdaTest ---- - -# LambdaTest overview - -[LambdaTest App Test Automation] is a popular cloud device farm. - -This integration is currently Android-only. - -### Change runner - -Modify the **app-level build.gradle**: - -```groovy title="android/app/build.gradle" -android { - // ... - defaultConfig { - //... - testInstrumentationRunner "pl.leancode.patrol.LambdaTestPatrolJUnitRunner" - } - // ... -} - -// ... -``` - -That's all! - -### Upload to LambdaTest - -To run Android UI tests on LambdaTest: - -1. Upload the app under test APK to LambdaTest ([see docs][LT_app_docs]) -1. Upload the instrumentation app APK to LambdaTest ([see docs][LT_test_docs]) -1. Start test execution on LambdaTest ([see docs][LT_execute_docs]) - - - - - -``` -$ export LAMBDATEST_PROJECT=AwesomeApp # optional -$ export LAMBDATEST_DEVICES="[\"Pixel 7 Pro-13\"]" # optional -• Building apk with entrypoint test_bundle.dart... -✓ Completed building apk with entrypoint test_bundle.dart (11.0s) - % Total % Received % Xferd Average Speed Time Time Time Current - Dload Upload Total Spent Left Speed -100 82.4M 100 255 100 82.4M 7 2897k 0:00:31 0:00:36 0:00:02 2051k -Uploaded app, "app_id": "lt://APP1016047291733313441063634", -Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", -{ - "status": [ - "Success" - ], - "buildId": [ - "5875687" - ], - "message": [ - "" - ] -} -``` - -[LT_app_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-2-upload-your-application -[LT_test_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-3-uploading-test-suite -[LT_execute_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-4-executing-the-test -[LambdaTest App Test Automation]: https://www.lambdatest.com/app-test-automation \ No newline at end of file +redirect: /documentation/integration/lambdatest +--- \ No newline at end of file From 076e272c9602ac81f81bd72e4cb7f5dc248d94fd Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 14:46:47 +0100 Subject: [PATCH 14/16] Remove unnecessary redirect --- docs/integrations/lambdatest.mdx | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 docs/integrations/lambdatest.mdx diff --git a/docs/integrations/lambdatest.mdx b/docs/integrations/lambdatest.mdx deleted file mode 100644 index 6347fb0f5..000000000 --- a/docs/integrations/lambdatest.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Integrations - LambdaTest -redirect: /documentation/integration/lambdatest ---- \ No newline at end of file From accc246c7048b3de057be3bfc744d25d35f810a8 Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 15:13:17 +0100 Subject: [PATCH 15/16] Fix whitespace --- docs/documentation/integrations/lambdatest.mdx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/documentation/integrations/lambdatest.mdx b/docs/documentation/integrations/lambdatest.mdx index 22485c88d..a8a2f0c99 100644 --- a/docs/documentation/integrations/lambdatest.mdx +++ b/docs/documentation/integrations/lambdatest.mdx @@ -32,12 +32,8 @@ That's all! To run Android UI tests on LambdaTest: 1. Upload the app under test APK to LambdaTest ([see docs][LT_app_docs]) -1. Upload the instrumentation app APK to LambdaTest ([see docs][LT_test_docs]) -1. Start test execution on LambdaTest ([see docs][LT_execute_docs]) - - - - +2. Upload the instrumentation app APK to LambdaTest ([see docs][LT_test_docs]) +3. Start test execution on LambdaTest ([see docs][LT_execute_docs]) ``` $ export LAMBDATEST_PROJECT=AwesomeApp # optional @@ -65,4 +61,4 @@ Uploaded testsuite, "app_id": "lt://APP1016047291733312896265135", [LT_app_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-2-upload-your-application [LT_test_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-3-uploading-test-suite [LT_execute_docs]: https://www.lambdatest.com/support/docs/getting-started-with-flutter-dart-android-automation/#step-4-executing-the-test -[LambdaTest App Test Automation]: https://www.lambdatest.com/app-test-automation \ No newline at end of file +[LambdaTest App Test Automation]: https://www.lambdatest.com/app-test-automation From 709141d56c1e5b4b9405ec8b3d97a2c6cbbaa016 Mon Sep 17 00:00:00 2001 From: Mateusz Wojtczak Date: Mon, 9 Dec 2024 15:13:56 +0100 Subject: [PATCH 16/16] Fix wording --- docs/documentation/integrations/lambdatest.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/documentation/integrations/lambdatest.mdx b/docs/documentation/integrations/lambdatest.mdx index a8a2f0c99..497fdb8db 100644 --- a/docs/documentation/integrations/lambdatest.mdx +++ b/docs/documentation/integrations/lambdatest.mdx @@ -25,8 +25,6 @@ android { // ... ``` -That's all! - ### Upload to LambdaTest To run Android UI tests on LambdaTest: