android-junit5
android-junit5 copied to clipboard
Testing with JUnit 5 for Android.
In our project (using JUnit 4) we define a `jacocoTestReport` Gradle task: task jacocoTestReport(type: JacocoReport, dependsOn: ["testInternalDebugUnitTest"]) { group = "Reporting" description = "Generate Jacoco coverage reports" reports { xml.enabled...
[The sharding feature that's available in AndroidJunitRunner](https://developer.android.com/training/testing/instrumented-tests/androidx-test-libraries/runner#shard-tests) is not working in AndroidJunit5Runner. Is there any way to achieve it? I tried to do it through the ExecutionCondition extension, but it...
Hi, is there a way to provide the ability for overriding compileSdkVersion? https://github.com/mannodermaus/android-junit5/blob/00ea01dfdb15ae24779e32b08f64c2c02de6a82a/build-logic/src/main/kotlin/Environment.kt#L38 ### More context My project is using compile SDK 31. I am using AWS Arm64 EC2 machine,...
hello We conducted the activity test by referring to the site below. https://github.com/mannodermaus/android-junit5/wiki/Writing-an-Activity-Test But I keep getting no further progress with NullPointExecption on that line. val scenario = scenarioExtension.scenario All...
I would like to use junit 5 to test my jetpack compose project. A compose test rule is required for setting up the UI and using Testing APIs: [(documentation)](https://developer.android.com/jetpack/compose/testing#setup) ```kotlin...
First off, I want to thank the maintainers of this repo for doing the herculean work of getting JUnit 5 up and running on Android! I'm running into an issue...
I'm having these tests in `src/androidTest/kotlin`: ```kotlin class ColorUtilsKtTest { class ReplaceAlphaFrom( val useCase: String, @ColorInt val receiver: Int, @ColorInt val param: Int, @ColorInt val expected: Int, ) @TestFactory fun...
The `GrantPermissionRule` works on JUnit4, but seems not working on JUnit5. Is there an alternative method for this? Code: ``` @Rule public GrantPermissionRule rule = GrantPermissionRule.grant( Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE ); ```...
I've run in an annoying crash when using `@ParameterizedTests` on Android 8.0/8.1 devices: After some digging, turns out that inspecting parameter annotations (Which happens in `ParameterizedTestMethodContext.isAggregator(Parameter)` crashes consistently if the...
Probably related to #199. Steps to reproduce: 1. Run whole instrumented class test that has at least one test method with parameters (such as `ActivityOneTest`) 2. Attempt to right click...