android-testing

How can I run an automatic robo test on Android app? like the one on Firebase Test Lab

孤者浪人 提交于 2021-01-29 13:20:04
问题 On the Play Store and on Firebase Test Lab I can run automated tests without writing any scripts, they just go through the app and try stuff for a few minutes. How can I run this kind of test either from the command line or from Android Studio? I have about 10 different phones I would like to run it on. Thanks. Edit: just to be clear, I'm asking about the automatic robot test, where I don't tell it anything, it just tries stuff. 回答1: There are 2 options : You can record Robo tests through

Start android emulator adb from Jenkins in windows (run instrumented tests, emulator does not appear)

元气小坏坏 提交于 2021-01-27 20:53:47
问题 I would like to start emulator from Jenkins to test Android app. This is my setup of the project in jenkins and console output: When I tried Jenkins android emulator plugin with existing emulator device and his name, setup and output is here: The build is successful, but I cant see the running emulator when testing is running. Strange thing of these two options is, that when I start the command line and type these two commands, the emulator is always shown and it is running normally. But from

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 Espresso listView scroll to

白昼怎懂夜的黑 提交于 2021-01-27 04:52:07
问题 I have a list_view, which I want to test. list_view item layout is RelativeLayout , adapter is ItemAdapter . This code works fine (item contatining Daft Punk is visible): @Test public void listViewTest() { Espresso.onView(withText("Daft Punk")).perform(click()); } Both of this variants fail: (The scrolling starts, comes to the item and then fails, the error is at the very and of this question.) @Test public void listViewTest() { Espresso.onData(artistWithName("Imagine Dragons")).perform

Android Espresso listView scroll to

烈酒焚心 提交于 2021-01-27 04:51:39
问题 I have a list_view, which I want to test. list_view item layout is RelativeLayout , adapter is ItemAdapter . This code works fine (item contatining Daft Punk is visible): @Test public void listViewTest() { Espresso.onView(withText("Daft Punk")).perform(click()); } Both of this variants fail: (The scrolling starts, comes to the item and then fails, the error is at the very and of this question.) @Test public void listViewTest() { Espresso.onData(artistWithName("Imagine Dragons")).perform

Android Test cases not working in debug mode

那年仲夏 提交于 2020-12-30 08:01:03
问题 I am not able to debug android Instrumentation test cases (using espresso & UiAutomator) But earlier test cases the debugging was working fine but with recent update it is not working anymore. It gets always struck up at instantiating unit test I can see in command window that it's trying to launch PACKAGE_NAME**.test** adb shell am instrument -w -r -e debug true -e class PACKAGE_NAME.LanguageScreenTest#testSelectImportant PACKAGE_NAME**.test**/android.support.test.runner.AndroidJUnitRunner

Active build variant does not have a test artifact

↘锁芯ラ 提交于 2020-12-29 11:49:09
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Active build variant does not have a test artifact

烂漫一生 提交于 2020-12-29 11:47:29
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Active build variant does not have a test artifact

こ雲淡風輕ζ 提交于 2020-12-29 11:45:23
问题 I have created a new build type called 'bitrise' based on the 'debug' build variant. The instrumented androidTests build and run fine when using the 'debug' build variant however when I switch over to my new 'bitrise' build variant I get the following errors: Process finished with exit code 1 Class not found: "com.mycompany.app.ui.race.RaceFragmentUiTest" And this warning when I select "Edit Configurations..." -> "Android Instrumented Tests" Versions 'com.android.tools.build:gradle:3.5.2'

Best practices for Android Unit Testing?

家住魔仙堡 提交于 2020-12-28 06:51:28
问题 I am developing a mobile android app. What are the most common libraries/frameworks used for Android unit testing? I feel that most of the business logic, database testing, Web services testing can all be done using JUnit. However, what's the best approach for testing UI, the UI workflow, etc? For example, how can we test if the Android app launches a web browser successfully? Or how can we confirm if buttons, certain things are pressed successfully? Or if images are loaded successfully? 回答1: