Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
72 views

After updating Kotlin to 2.2.0, my autotest started failing on the start screen with the following error in Espresso class on compose view: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 ...
Red Cape's user avatar
0 votes
0 answers
25 views

I am developing an Android app that uses Microsoft Entra ID login for authentication. After a successful login, the app fetches some user data and also allows saving additional data to the server. I ...
Vikas Sharma's user avatar
0 votes
0 answers
27 views

I'm trying to switch from the deprecated ActivityTestRule to ActivityScenarioRule but facing an issue with some of the tests. I found out that I need to move from startActivity to ActivityScenario....
iamkaan's user avatar
  • 1,515
0 votes
1 answer
83 views

I want to be able to call a function during Espresso UI testing to rotate the device from portrait to landscape. I followed this guide from the docs exactly. I have a brand new API 34 emulator, my SDK ...
Zeek Aran's user avatar
  • 686
0 votes
1 answer
93 views

I'm writing an Android app using Jetpack Compose. It has some dialogs. I am testing with Espresso that they disappear when appropriate. When everything's working right, I can test that all dialogs ...
Dan Getz's user avatar
  • 9,233
0 votes
0 answers
37 views

I have a large app with hundreds of UI tests, and moving from an emulator on API 34 to 35 causes exactly one failure. A simple perform(click()) call on spanned text does not work, yet does not fail. ...
Zeek Aran's user avatar
  • 686
0 votes
1 answer
31 views

I have an instrumentation test that's using UriIdlingResource from Espresso to keep track of when the app is running API requests in the background so that the test code can wait until the app is idle ...
castletheperson's user avatar
1 vote
1 answer
43 views

I am trying to get into android espresso and have been given an .apk to try things out. Setting aside the legwork how I managed to get the test to run, I am now trying to figure out how to find the ...
Levia's user avatar
  • 11
0 votes
1 answer
36 views

When testing with Espresso, setting a value on a Slider directly does not trigger the onChange or OnSliderTouchListener callbacks. I haven't found any official documentation or reliable information ...
CalmPerson's user avatar
0 votes
0 answers
19 views

can you tell me how I can change the emulator settings before running Android tests. I want to disable animations on the device before starting the test. But I can't find a way how.
Zavorokhin Efim's user avatar
0 votes
0 answers
33 views

When I upgrade the Espresso Accessibility from 3.3.0 to 3.4.0 and higher, I get the following error which makes the test unable to launch the app: SSLHandshakeException: Certificate transparency ...
Vadym's user avatar
  • 441
0 votes
1 answer
122 views

I'm trying to update my screenshot routine used in the instrumentation tests of multiple projects using the new suggested method. Which is, of course, more complicated then the pervious version. There ...
Martin's user avatar
  • 11.9k
0 votes
1 answer
166 views

I have updated my test cases dependencies from this to this(as given below in code snippet ), since then I am facing this error of java.lang.NullPointerException: Cannot run onActivity since Activity ...
Sopnil.Shinde's user avatar
0 votes
2 answers
57 views

I am trying to run the official Kaspresso sample project from the GitHub repository: Kaspresso on GitHub. However, when I attempt to execute the sample tests, I encounter the following error: ...
pawelnbd1992's user avatar
2 votes
1 answer
304 views

I'm working on an Android project where I'm using Hilt for dependency injection and have recently enabled KSP (Kotlin Symbol Processing) to replace KAPT (Kotlin Annotation Processing Tool). My setup ...
Waheed Shah's user avatar
0 votes
1 answer
57 views

I ran into an issue at work where an Espresso test failed once about every 10-20 times. When it failed, it was with an AmbiguousViewMatcherException. What seemed to be happening is that when slides ...
Chad Schultz's user avatar
  • 7,910
0 votes
1 answer
82 views

I am writing Espresso UI tests with okhttp3.mockwebserver.MockWebServer. I am facing an issue, that my MockWebServer is not accessible from the application running in AVD. This works: Access the ...
Lukas K's user avatar
  • 6,460
0 votes
0 answers
38 views

I am using Espresso tests to test my Android (targetSDKVersion: 34) app. The app includes a module that uses Google Maps and location services. I want to mock the location to simulate user movement ...
Mr T's user avatar
  • 123
0 votes
1 answer
52 views

I have developed an Android app that integrates with Firebase Firestore and Realtime Database. I now want to perform End-to-End (E2E) tests that involve Firebase. Test Setup: I am using Espresso for ...
Mr T's user avatar
  • 123
0 votes
1 answer
37 views

I am testing an Android app using Espresso, and I have an activity that should only be displayed in portrait mode. To enforce this, I programmatically lock the activity in portrait mode when it is ...
Mr T's user avatar
  • 123
0 votes
1 answer
138 views

I am looking for some help generating a code coverage report for Android integration tests in a multi-module project. Specifically I have an app module along with a mix of android and java library ...
Rich Luick's user avatar
  • 2,364
0 votes
1 answer
19 views

I have a fragment which waits for an integer from args. The code itself works fine, but when I want to write a UI test for this fragment it gives me a java.lang.NullPointerException: null cannot be ...
E. P.B.'s user avatar
3 votes
0 answers
175 views

In my viewmodel I get a Flow<PagingData> by calling the use case in charge of doing it, and then caching it, as recommend it by android developer's guide, like this: val bestRatedRepos: Flow<...
alGhul7's user avatar
  • 163
2 votes
1 answer
124 views

For an instrumented androidTest test, I need to click the ALLOW "button" as popped up by the system when the app starts on a device running Android 8 (API 26): (Note: on Android 14 (API 34) ...
sfinja's user avatar
  • 883
3 votes
1 answer
135 views

I have an Android app with 225 espresso tests. Up to now, I have always been able to run all tests in a raw on all devices (Samsung smartphones and tablets, from Android 7 to 14) I now have a brand ...
Laurent D.'s user avatar
2 votes
1 answer
170 views

The formal Android Developers documentation provides an enlightening introduction to the Fundamentals of testing Android apps. I managed to successfully create 3 different types of test setups in ...
sfinja's user avatar
  • 883
-1 votes
1 answer
39 views

How do i run code before onCreate called in my test activity? @Before is called after onCreate which causes problems. Im using public ActivityScenarioRule<MyActivity> activityScenarioRule = new ...
lastpeony4's user avatar
1 vote
1 answer
230 views

Starting with Android Espresso libs 3.6.0 the captureToBitmap was changed Previous with 3.5.x: fun ViewInteraction.captureToBitmap(): Bitmap { using it onView(isRoot()).captureToBitmap()....
hannes ach's user avatar
  • 17.9k
0 votes
1 answer
49 views

I am doing an instrumentation test of Fragment is displayed or not. When I start the test it execute, I am able to see FragmentLogin view in physical device but test fail by saying androidx.test....
Dnveeraj's user avatar
  • 138
1 vote
0 answers
143 views

I am trying to test a Main Activity class that is @AndroidEntryPoint using Hilt Testing in my Android application. The PermissionHelper class is defined as follows: public class PermissionHelper { ...
Nadin Martini's user avatar
1 vote
3 answers
620 views

I m trying to write a UI test using BDD + Compose but I keep getting the following error: Test not setup properly. Use a ComposeTestRule in your test to be able to interact with composables I have ...
sri Natarajan's user avatar
2 votes
0 answers
124 views

After migration to Credential Manager I can't find a way how to test sign-in scenarios for different cases. When I used to use GoogleSignIn it was simple. The following code helped me: protected fun ...
Den's user avatar
  • 83
0 votes
0 answers
64 views

I am encountering an issue with my Android application's UI tests using Espresso. When I run a UI test, almost nothing is visible on the screen. However, when I normally launch the application on a ...
Taras Stavnychyi's user avatar
0 votes
0 answers
17 views

After I select an item from spinner using index how do I get the name of the item selected and then compare it with the results shown on page. I tried a custom matcher to get spinner text but it ...
MiniV's user avatar
  • 1
0 votes
1 answer
98 views

According to the firebase documentation I should be able to specify multiple test target filters - https://cloud.google.com/sdk/gcloud/reference/firebase/test/android/run#--test-targets I've specified ...
Boyana Staneva's user avatar
1 vote
0 answers
77 views

I have a multimodular project and I want to test benchmarking These are my modules :app [variant : debug, release ; flavors: prod, stage] [globalPackageName] :presentation [loginPackageName] :data :...
Shivam's user avatar
  • 21
1 vote
1 answer
46 views

I tried to mock the following using Matcher<Intent> on Android Espresso: Intent { act=android.intent.action.CHOOSER (has extras) } handling packages:[[android, com.android.systemui]], extras: [...
cprogrammer's user avatar
0 votes
1 answer
129 views

I have an AutoCompleteTextView in my Android Activity In my espresso test, I want to check if the popup with the proposals is opened or closed. How can I do that? I have tried many ideas, including: ...
Laurent D.'s user avatar
0 votes
0 answers
99 views

I'm having trouble checking if a Toast is present on the screen using Android Espresso. Are there any other ways to do this? In my specific case, the Toast is triggered on the login screen, but it's ...
Jefferson Jales's user avatar
3 votes
0 answers
81 views

I'm encountering the following exception while running an Android Espresso UI test in Android Studio: Java: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/concurrent/futures/...
cdn user's user avatar
3 votes
1 answer
70 views

Is there a way to click an item in an inflated PopupMenu anchored to a ListView item? I have a PopupMenu that is created by clicking a button inside a ListView. I need to click an item inside the ...
cj-'s user avatar
  • 342
5 votes
3 answers
2k views

The "Record espresso test" option is greyed out in Android Studio. What are possible reasons for this? I have installed the Espresso test dependencies and I have an emulator running.
HPage's user avatar
  • 1,533
0 votes
1 answer
60 views

I would need to parse the JSON as a gradle parameter to supply UI tests by that data. What I am currently doing in build.gradle: def getJson() { project.getProperties().get('getJson') } and then I am ...
MobileStudent's user avatar
4 votes
0 answers
795 views

I have the following sample code: @get:Rule val activityRule = ActivityScenarioRule<KeyActivity>(intent) @Test fun test() { activityRule.scenario.onActivity { ...
Henri's user avatar
  • 41
0 votes
1 answer
157 views

Is there a way that we can automatically and selectively run only relevant test cases per PR? My company has Espresso test integrated in CI/CD pipeline so that each PR needs to go through espresso ...
IChung's user avatar
  • 479
0 votes
1 answer
124 views

I've been facing an issue when trying to run instrumented tests for a fragment. With the code below, the test starts but looks like it never launches the fragment, gets stuck on loading. I need to ...
AndroidDev's user avatar
1 vote
3 answers
820 views

My Android app is using Jetpack Compose. Inside one of my @Composable functions, I get a coroutine scope: @Composable fun MyComposable() { val scope = rememberCoroutineScope() // ... Then, I ...
Dan Getz's user avatar
  • 9,233
1 vote
0 answers
879 views

I am attempting to write UI tests for certain views, where some tests are already implemented in Java. I also aim to include tests for Compose views. However, in my attempts, using either test tags or ...
Danial clarc's user avatar
0 votes
1 answer
118 views

I'm testing the login feature with Espresso and it's correctly working as long as I check that the navigation action would bring the user to the fragment ith correct id. @Test fun loginLogout() { ...
fillobotto's user avatar
  • 3,785
2 votes
0 answers
272 views

When i run my espresso test (see below) it cannot find a view by a given Text ("FindMeText"). Is it possible to execute some action on a Composable using espresso? According to android docu ...
Remiwaw's user avatar
  • 183

1
2 3 4 5
67