Skip to content

When are system properties registered and are JUnit properties supported? #328

Answered by mannodermaus
mgroth0 asked this question in Q&A
Discussion options

You must be logged in to vote

As you point out, you can provide Java system properties to the Android instrumentation via a runner argument. The most common applications for this would be to either add them to your build script file (i.e. in build.gradle.kts), or to apply them along with the command that starts the instrumentation tests (i.e. via adb shell am instrument... or ./gradlew connectedAndroidTest).

  1. The system properties are registered by the AndroidJUnit5 runner before execution of a test class with JUnit 5 tests starts. Think of it this way: The Android instrumentation throws a class at this runner, and the runner determines if there are any relevant tests inside of it. If yes, then they are executed, and …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mgroth0
Comment options

@mannodermaus
Comment options

Answer selected by mgroth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants