JE42
JE42

Reputation: 5169

How can I run a connectedAndroidTest against the release build?

I would like to test an android application's release build using the instrumentation tests.

It looks like the default connectedAndroidTest gradle command is only available for debug builds. Is there a way to configure it for release builds ?

Upvotes: 1

Views: 712

Answers (1)

Tapash
Tapash

Reputation: 368

You can test instrumentation test for release build by setting below line in your app/build.gradle file

android {
    testBuildType "release"
}

or through Android studio terminal/command prompt by below command

gradlew connectedAndroidTest  -PtestBuildType=release

Upvotes: 4

Related Questions