2,169 questions
0 votes
0 answers
25 views
How to test Android app with Entra ID login (Espresso) and verify data saving on server?
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 ...
0 votes
0 answers
26 views
Testing warm start deeplinks using ActivityScenario
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....
0 votes
0 answers
45 views
Jacoco report execution error for Android kotlin based project
I am trying to generate Jacoco report for Android kotlin based project. I am using Android Emulator for running androidTests and generate ec file for coverage. But facing following issue all the time. ...
1 vote
0 answers
29 views
How to test toast in Android Instrumented Test with Compose?
I want to write instrumented tests for Android UI's toasts. But it seems my codes are not working. It can't catch the toast when it's actually displayed on phone. I think possibly issue with my toast ...
1 vote
0 answers
121 views
java.lang.IllegalStateException: Expected `pm dump-profiles` stdout to be either black or saved to '/data/misc/profman/com.app.myapp-primary.prof.txt'
I am using a baseline profile for my app, and it works well when using a benchmark test for measuring performance, but when I try to run the baseline profile generator then it run the specified path ...
1 vote
1 answer
253 views
Execution Failed for Task :app:connectedDebugAndroidTest – Android Test Issue
I'm encountering a problem while running my Android instrumented tests, and after trying multiple solutions, I still haven't been able to resolve it. Here's the error message I'm getting: [Incubating] ...
1 vote
1 answer
145 views
Jetpack Compose test fails with "Compose did not get idle after 1610148 attempts" when running all tests together, but passes when run individually
I'm testing a DocumentCheckLoadingScreen composable using Jetpack Compose and Robolectric, and encountering a strange issue. The test works perfectly fine while running in isolation, but fails with ...
0 votes
0 answers
32 views
Testing failing because of java.lang.AssertionError: Activity never becomes requested state
I am new to instrumented tests and I am not able to have my very first test class to run. It is failing with this error: java.lang.AssertionError: Activity never becomes requested state "[...
0 votes
1 answer
119 views
kotlin.test.BeforeTest is not resolved
After updating Android libraries (including Kotlin) I found that @BeforeTest became unresolved (@Before is resolved, it belongs to org.junit). import org.junit.Before import org.junit.Test import org....
0 votes
0 answers
51 views
InputConnection Support on Android 9+
I feel a little lost. I've created a subclass of TextureView which should support text input via keyboard. I've tested my code on physical device with Android 12 and Emulator and it works fine. But, ...
0 votes
0 answers
33 views
Espresso 3.4.0: Certificate transparency failed
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 ...
0 votes
1 answer
122 views
In which package are androidx.test.core.app.DeviceCapture.takeScreenshot or androidx.test.espresso.screenshot.captureToBitmap located
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 ...
0 votes
1 answer
166 views
java.lang.IllegalStateException: Cannot move to state "RESUMED" since the Activity has been destroyed already
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 ...
0 votes
2 answers
55 views
Unable to Run Kaspresso Sample: Execution failed for task ':samples:kaspresso-sample:connectedDebugAndroidTest'
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: ...
2 votes
1 answer
303 views
Does Hilt still require kaptAndroidTest when ksp is enabled for Android (Instrumentation) tests?
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 ...