Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
1 vote
0 answers
18 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
65 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 ...
0 votes
1 answer
72 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] ...
0 votes
1 answer
116 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
25 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
80 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
40 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
31 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
100 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
119 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
50 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
239 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 ...
2 votes
0 answers
64 views

Generating Baseline Profiles for Features Behind Authorization Flow

I’m working on generating baseline profiles for key features in my application, such as Listing and Product Detail, which are widely used and important to users. However, these features are accessible ...
0 votes
0 answers
127 views

UncompletedCoroutinesError While Unit Testing Paging3 with kotlinx.coroutines.test in Android

Problem Description: I'm encountering an intermittent issue while writing a unit test for fetching data using Paging3 and Room in an Android application. The test utilizes kotlinx.coroutines.test for ...
2 votes
1 answer
142 views

How do I run unit tests for single flavor without running all tests?

I'm working on unit tests for my Android app. My app has two flavors: "flavor 1" and "flavor 2", configured in default.gradle. Tests common to both are in test and I also have ...

15 30 50 per page
1
2 3 4 5
...
145

AltStyle によって変換されたページ (->オリジナル) /