Unit tests not working on Android Studio Arctic Fox

If you’re using Android Studio Arctic Fox, you need to modify your app/build.gradle a bit.

Add

android {
    testOptions {
        execution 'ANDROIDX_TEST_ORCHESTRATOR'

        unitTests.all {
            useJUnitPlatform() // <--- this is the important part
        }
    }
}

And also make sure you add junit-engine to your dependencies

testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.1'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)