android-testing Questions

2

For this code class Foo { var name: String? = null } kotlin compiler generates: private String name; public final String getName() { ... } public final void setName(String name) { ... } Eve...
Nosography asked 22/11, 2017 at 23:46

6

Edit: Found out that MockK is causing this issue. I guess it is duplicating these files when I'm mocking my API request. When I remove MockK and/or Mockito. I do not get these errors. Any ideas? Ge...
Parthinia asked 17/1, 2023 at 17:34

4

Solved

I am using Espresso for Instrumented Test but got this error on the Stack Trace: The error being caused by a missing class as shown below: Caused by: java.lang.ClassNotFoundException: Didn't find ...

4

Solved

Is there any option to exclude Dagger2 classes from test coverage report in Android Studio

4

Solved

I've done something in build.gradle to remove the green highlighting of the androidTest.java package. I don't know how to get it back. IntelliJ has a "Mark directory as test sources root" option ...
Rebec asked 31/7, 2015 at 14:33

8

Solved

I'm setting up Android app structure with Gradle and Android Studio and Espresso UI testing for a project. No matter what I try, the androidTest folder never appears in AndroidStudio's project str...
Picker asked 17/5, 2015 at 22:23

4

Solved

We can get the string resource in Composable through stringResource like @Composable fun Heading( @StringRes textResource: Int ) { Text( text = stringResource(id = textResource), color = colorB...

4

Solved

My target is to mock Build.Version.SDK_INT with Mockito. Already tried: final Build.VERSION buildVersion = Mockito.mock(Build.VERSION.class); doReturn(buildVersion.getClass()).when(buildVersion).g...
Photographic asked 28/10, 2016 at 7:51

3

I am working on a project where in we are trying to use the ANDROID TEST ORCHESTRATOR for it's obvious benefits of isolating crashes. But while executing the test suite, it appears to me that as th...

1

I am trying to get coverage report from our test suite which needs to run with Android Test Orchestrator. There is a fixed issue which references another fixed issue. Following their suggestion I h...

0

Following this documentation to get multi-module test reports for instrumented tests in a single HTML page, how to use it when using Kotlin DSL with Version Catalog? So far none of these approach w...

1

Solved

Is it possible to run an instrumented test in an Android module that has no activity but uses AppCompat dependencies? I am attempting to run a simple test but only works if moved to app module. Uti...
Lannylanolin asked 28/2, 2024 at 17:21

2

Gradle Android test does not support filter (--tests). gradlew test --tests com.example.test.* works. gradlew connectedAndroidTest --tests com.example.test.* Error: Unknown command-line opt...
Baba asked 24/2, 2018 at 22:19

4

This is my testing class: class RocketListVMTest { @get:Rule var instantTaskExecutorRule = InstantTaskExecutorRule() private lateinit var sut: RocketListVM private var activeOnlyToggle = fals...
Thermoelectric asked 24/2, 2021 at 1:22

4

I recently moved to another computer and needed to reset all my environment. So, this tests was working before. But I didnt remember which version of Java/JDK I was using before. Well, the problem ...
Wrote asked 10/11, 2021 at 1:17

3

Solved

When I run my UI tests, they work perfectly fine and I can see tests are passed through logs. But Status of the Tests is never updated on Android Studio's panel. Did anyone experience the same prob...

3

I recently discovered the property testOptions.animationsDisabled in the Android Gradle plugin. I was hoping it would be helpful to disable the animations on my devices when executing UI tests wit...

5

Solved

I have dialog in compose: @Composable fun testgtt() { val saveDialogState = remember { mutableStateOf(false) } Button(onClick = { saveDialogState.value = true }, modifier = Modifier.testTag(PLACE...
Calibrate asked 17/3, 2022 at 6:59

2

I'm using jetpack compose and use this code to show my Snackbar: LaunchedEffect(true) { viewModel.snackBar.collectLatest { message -> scaffoldState.snackbarHostState.currentSnackbarData?.dism...

5

Launching lib/main.dart on Android SDK built for x86 in debug mode... [!] Gradle does not have execution permission. You should change the ownership of the project directory to your user, or mo...

1

Solved

I am performing instrumentation testing, in that I am invoking one of the activities which call 2 APIs when activity is created. Now I want to write instrumentation test cases for this activity, w...

7

Solved

When I am trying to run Android tests by executing: ./gradlew connectedDebugAndroidTest The following error occurs: com.android.builder.testing.ConnectedDevice > No tests found.[devicename] ...
Streptothricin asked 27/3, 2017 at 8:47

1

I'm using Espresso to test a screen with a RecyclerView and a ComposeView in the ViewHolder. I want to click on a particular Composable inside the RecyclerView Thanks

3

Solved

I have encountered a problem that when I tried to run Android Instrument test, android studio will start building, everything is good until it stuck to this line "> Task :app:connectedDebug...

8

Solved

I am writing a test class and I am trying to grant the permissions using the rule GrantPermissionRule: @Rule public GrantPermissionRule permissionsRule = GrantPermissionRule.grant( Manifest.permi...
Emitter asked 23/12, 2018 at 13:22

© 2022 - 2025 — McMap. All rights reserved.