From e4c651d9146e817501af139f47eca1571c7b8f1d Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Mon, 8 Nov 2021 13:18:31 -0800 Subject: [PATCH 1/2] Update AndroidTestOrchestrator sample to monitor 1.5.0-beta01, orchestrator 1.4.1-beta01. And remove obsolete android.test libraries from dependencies. --- runner/AndroidTestOrchestratorSample/README.md | 3 +-- .../AndroidTestOrchestratorSample/app/build.gradle | 8 ++------ .../CalculatorInstrumentationTest.java | 1 + runner/AndroidTestOrchestratorSample/build.gradle | 12 +++++++----- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/runner/AndroidTestOrchestratorSample/README.md b/runner/AndroidTestOrchestratorSample/README.md index 8b6a57d29..4ac8bdd45 100644 --- a/runner/AndroidTestOrchestratorSample/README.md +++ b/runner/AndroidTestOrchestratorSample/README.md @@ -14,11 +14,10 @@ This project uses the Gradle build system. You don't need an IDE to build and ex 1. Check out the relevant code: * The application under test is located in `src/main/java` * Tests are in `src/androidTest/java` -1. Create the test configuration with a custom runner: `androidx.test.runner.AndroidJUnitRunner` +1. Create the test configuration * Open *Run* menu | *Edit Configurations* * Add a new *Android Tests* configuration * Choose a module - * Add a *Specific instrumentation runner*: `androidx.test.runner.AndroidJUnitRunner` 1. Connect a device or start an emulator * Turn animations off. (On your device, under Settings->Developer options disable the following 3 settings: "Window animation scale", "Transition animation scale" and "Animator duration scale") diff --git a/runner/AndroidTestOrchestratorSample/app/build.gradle b/runner/AndroidTestOrchestratorSample/app/build.gradle index ebc1375dd..96f477b52 100644 --- a/runner/AndroidTestOrchestratorSample/app/build.gradle +++ b/runner/AndroidTestOrchestratorSample/app/build.gradle @@ -22,11 +22,6 @@ android { productFlavors { } - useLibrary 'android.test.runner' - - useLibrary 'android.test.base' - useLibrary 'android.test.mock' - testOptions { execution 'ANDROIDX_TEST_ORCHESTRATOR' } @@ -41,6 +36,7 @@ dependencies { androidTestImplementation 'androidx.test:core:' + rootProject.coreVersion; androidTestImplementation 'androidx.test.ext:junit:' + rootProject.extJUnitVersion; androidTestImplementation 'androidx.test:runner:' + rootProject.runnerVersion; + androidTestImplementation 'androidx.test:monitor:' + rootProject.monitorVersion; androidTestImplementation 'androidx.test.espresso:espresso-core:' + rootProject.espressoVersion; - androidTestUtil 'androidx.test:orchestrator:' + rootProject.runnerVersion; + androidTestUtil 'androidx.test:orchestrator:' + rootProject.orchestratorVersion; } diff --git a/runner/AndroidTestOrchestratorSample/app/src/androidTest/java/com/example/android/testing/androidtestorchestratorsample/CalculatorInstrumentationTest.java b/runner/AndroidTestOrchestratorSample/app/src/androidTest/java/com/example/android/testing/androidtestorchestratorsample/CalculatorInstrumentationTest.java index 80b31bae5..95de2fb8a 100644 --- a/runner/AndroidTestOrchestratorSample/app/src/androidTest/java/com/example/android/testing/androidtestorchestratorsample/CalculatorInstrumentationTest.java +++ b/runner/AndroidTestOrchestratorSample/app/src/androidTest/java/com/example/android/testing/androidtestorchestratorsample/CalculatorInstrumentationTest.java @@ -16,6 +16,7 @@ package com.example.android.testing.androidtestorchestratorsample; +import androidx.test.platform.graphics.HardwareRendererCompat; import junit.framework.TestSuite; import org.junit.Before; diff --git a/runner/AndroidTestOrchestratorSample/build.gradle b/runner/AndroidTestOrchestratorSample/build.gradle index 8006df0c8..49a61666f 100644 --- a/runner/AndroidTestOrchestratorSample/build.gradle +++ b/runner/AndroidTestOrchestratorSample/build.gradle @@ -27,9 +27,11 @@ ext { buildToolsVersion = "31.0.0" androidxAnnotationVersion = "1.2.0" guavaVersion = "30.1.1-android" - coreVersion = "1.4.1-alpha03" - extJUnitVersion = "1.1.4-alpha03" - runnerVersion = "1.4.1-alpha03" - rulesVersion = "1.4.1-alpha03" - espressoVersion = "3.5.0-alpha03" + coreVersion = "1.4.0" + extJUnitVersion = "1.1.3" + runnerVersion = "1.4.0" + monitorVersion = "1.5.0-beta01" + rulesVersion = "1.4.0" + espressoVersion = "3.4.0" + orchestratorVersion = "1.4.1-beta01" } From 7f68e652e1b69220b5f8de681ad705e37b5efb12 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Thu, 18 Nov 2021 13:43:19 -0800 Subject: [PATCH 2/2] Update to monitor 1.5.0-rc01 and orchestrator 1.4.1-rc01 --- runner/AndroidTestOrchestratorSample/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/AndroidTestOrchestratorSample/build.gradle b/runner/AndroidTestOrchestratorSample/build.gradle index 49a61666f..bcce2a86c 100644 --- a/runner/AndroidTestOrchestratorSample/build.gradle +++ b/runner/AndroidTestOrchestratorSample/build.gradle @@ -30,8 +30,8 @@ ext { coreVersion = "1.4.0" extJUnitVersion = "1.1.3" runnerVersion = "1.4.0" - monitorVersion = "1.5.0-beta01" + monitorVersion = "1.5.0-rc01" rulesVersion = "1.4.0" espressoVersion = "3.4.0" - orchestratorVersion = "1.4.1-beta01" + orchestratorVersion = "1.4.1-rc01" }