Sunshine
Sunshine

Reputation: 387

Include Tests to run in build process Android

I have been working on a module, whenever it is build using "gradlew assemble"it will generate an aar file in build/output folder. I have created few tests extending the InstrumentationTestCase in android app module, I want to run those tests whenever I build the library using gradle command.If compilation of tests "pass" the build(aar) should happen else it should fail. Could any one please help me on this?

Upvotes: 2

Views: 62

Answers (1)

CodyEngel
CodyEngel

Reputation: 1501

Running gradlew clean connectedCheck should run through all of your tests on all connected devices and will also build out your aar file. That's the easiest way.

Upvotes: 1

Related Questions