gradle-android-test-plugi

Android Instrumental Test running on Emulator but not on real device

耗尽温柔 提交于 2021-01-29 15:05:40
问题 I am trying to run android Instrumental Test it seem running on emulator gives test result but on real device its not working and output is "Test running failed: No test results" Below is my build.gradle file apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "my.app" minSdkVersion 18 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx

Avoid 'Variant Selection Conflicts' warning when using android test plugin without release variant

折月煮酒 提交于 2021-01-27 11:29:30
问题 What I want to do & the problem I updated my Android Studio and Android Gradle Plugin to 3.0.1 and my Gradle Wrapper to 4.1 and can build & deploy my Android Gradle project in release variant on a device via IDE. However, the following 'Gradle Sync' warning messages are shown: Warning:Module 'library' has variant 'release' selected, but the modules ['integration-test'] depend on variant 'debug' The problem here is, that there is no 'release' variant for the integration-test module which uses

Android command line - how to run a single unit test method

可紊 提交于 2019-12-24 06:30:05
问题 in android from command line i am trying to run just a single test case. from the IDE it works fine by right click. But when i try to do it using the following command in CLI IT FAILS: ./gradlew test --tests "com.xyz.b.module.TestClass.testToRun" i get the following error: > Unknown command-line option '--tests'. i guess its a old thread perhaps but i was following here: Anyway , how can i run my UNIT TEST single method ? i want to emphasis that i want to run a single unit test not

Android Instrumentation Tests Stuck “Running Tests” Forever Android Studio

别说谁变了你拦得住时间么 提交于 2019-12-23 17:24:42
问题 I use Android Espresso Tests with latest Android Studio 2.1.2 and Tests are running ok but it does not seems like the standalone test app returns back the results to reflect back to Android Studio and it shows Running Tests Forever 回答1: I realize this is an old question, but I just ran into this and didn't see any other search results that had the same problem. In my case, this was caused by the code under test having a stack overflow exception, which it seems that the test runner failed to

How to run Uiautomator tests in to multiple devices?

空扰寡人 提交于 2019-12-10 15:33:26
问题 I am trying to Uiautomator android Ui tests in a .bat file. but i could not able them run parallelly. Here is my execution flow and have connected 3 devices -> adb devices XXXX XXXX XXXX -> adb push ./bin/UiautomatorTests.jar /data/local/tmp/ -> adb shell uiautomator runtest UiautomatorTests.jar -c com.music.tests Here how can i give a common common command for all the devices to runs with parllely 回答1: You can checkout Uiautomator-bot as it seems to fit your requirement. It can run

Don't fail the gradle build if a test is failing with the gradle-android-test-plugin

我的梦境 提交于 2019-12-05 15:09:20
问题 I set my project up to run with Robolectric and the the gradle-android-test-plugin. This all works fine and first tests are running and failing. If a test fails this will also fail the gradle build. Is there a way to just let the build go on and write down the failing tests for evaluation in a later step? The plan is to integrate the testing in a continuous integration server and there the build should only be unstable if a test fails. 回答1: The correct syntax with AndroidConnectedTests is as

Variant debug has no output with type INSTANT_RUN_MERGED_MANIFESTS

寵の児 提交于 2019-12-03 13:56:12
问题 What I want to do & the problem I updated my Android Studio and Android Gradle Plugin to 3.0.0 and my Gradle Wrapper to 4.2.1 and want to build & deploy my Android Gradle project on a device via IDE. Building succeeds When I try to deploy my :app module to a connected device, I receive the error: Error:A problem occurred configuring project ':integration-test'. Variant 'debug' has no output with type 'INSTANT_RUN_MERGED_MANIFESTS' Details about the project (simplified) The project consists of