BenDr0id
BenDr0id

Reputation: 156

Is it possible to run InstrumentationTestRunner programmatically?

Is it possible to invoke a InstrumentationTestRunner programmatically from application A to run all tests in application B?

And is it possible to fetch the results?

Upvotes: 2

Views: 868

Answers (2)

Diego Torres Milano
Diego Torres Milano

Reputation: 69208

The post Android: Running tests from code is probably what you are looking for.

Upvotes: 3

Kurtis Nusbaum
Kurtis Nusbaum

Reputation: 30825

I'm assuming application A is a non-android applicaiton here right? So If application A was a bash script you could do something like the following:

#!/bin/bash
adb shell am instrument -w

Put that in a script file, and then you can just run that script every time you want to run your tests.

Upvotes: 0

Related Questions