https://kotlinlang.org logo
#android
Title
# android
f

fitermay

02/08/2023, 3:02 PM
An Android question, not Kotlin specific: What do I use to be able to write non-UI tests that run on JVM? I don’t want to have to create an activity like Roboelectric examples suggest. I don’t want a UI test — I just don’t want to have to mock platform dependencies.
😶 6
l

Landry Norris

02/08/2023, 3:13 PM
You can use the androidUnitTest source set. Code there runs on your local machine.
e

ephemient

02/08/2023, 3:17 PM
1. 😶 (see the channel description) 2. Landry's answer only applies if you're using Kotlin Multiplatform. if you're not, this is described in the usual Android documentation.
5 Views