Skip to main content
0 votes
0 answers
16 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 "[...
xerez's user avatar
  • 89
0 votes
1 answer
46 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....
CoolMind's user avatar
  • 29k
0 votes
0 answers
27 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, ...
Genealogy's user avatar
0 votes
0 answers
19 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 ...
Vadym's user avatar
  • 411
0 votes
0 answers
27 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 ...
Martin's user avatar
  • 11.9k
0 votes
1 answer
51 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 ...
Sopnil.Shinde's user avatar
0 votes
2 answers
42 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: ...
pawelnbd1992's user avatar
1 vote
1 answer
107 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 ...
Waheed Shah's user avatar
0 votes
0 answers
39 views

Classess or Objects inside main source set, can not be accessed by test (unit test) source set

It is a simple unit test, with only a single object and its corresponding unit test class. The object is in main/java/com/example/simpleunittest/Validator.kt and the test class is in test/java/com/...
plasma's user avatar
  • 13
1 vote
0 answers
54 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 ...
beigirad's user avatar
  • 5,814
0 votes
0 answers
85 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 ...
kareem mohamed's user avatar
0 votes
0 answers
30 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 build.gradle. Tests common to both are in test and I also have flavor-...
Barry Fruitman's user avatar
1 vote
0 answers
83 views

How to unit test the suspend function to meet branch coverage using mockk

I wrote a Kotlin code and I want to write unit tests for it. But I found that the unit test code I wrote still cannot cover 100% branch coverage. What should I do it? kotlin code: class MyRepository @...
pnkj's user avatar
  • 518
1 vote
2 answers
93 views

How to test navigation in Jetpack Compose on user click?

I have an app where I have 2 screens: NavHost( navController = navController, startDestination = UserListScreen ) { composable<UserListScreen> { UserListScreen( ...
Always Learner's user avatar
0 votes
0 answers
40 views

Task :app:connectedDebugAndroidTest Starting 0 tests Finished 0 tests

About Automation Testing in android kotlin|java project, using with Appium framework. After follow Automation Testing with Appium guideline I did run the Auto Test on RealDevie/Emulator/Simulator ...
Huy Tower's user avatar
  • 7,976

15 30 50 per page
1
2 3 4 5
145