stf icon indicating copy to clipboard operation
stf copied to clipboard

Using adb while running automation

Open ekftjq opened this issue 9 years ago • 3 comments

Hello,

I'm using openSTF to run automated tests for my android app. I was wondering if it is possible to have adb commands within my automation code to run them remotely in STF. For example, I want to run adb logcat for every test failures. I can connect adb remotely, but I was wondering if I can run adb remotely within the automation code.

Thanks!

ekftjq avatar Jun 13 '17 18:06 ekftjq

It's not really a job for STF, but you can get logcat while testing on devices connected through STF.

While connected through STF, devices behave almost as though they are attached to your PC.

Getting logcat during tests is a job for your testing framework. I get the most out of instrumentation tests using the Spoon runner

I hope this answers your query

On Tue, Jun 13, 2017, 21:13 Moon Seop [email protected] wrote:

Hello,

I'm using openSTF to run automated tests for my android app. I was wondering if it is possible to have adb commands within my automation code to run them remotely in STF. For example, I want to run adb logcat for every test failures. I can connect adb remotely, but I was wondering if I can run adb remotely within the automation code.

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstf/stf/issues/618, or mute the thread https://github.com/notifications/unsubscribe-auth/AA68gh3PDcuYPcWLcqQo1_vD_WOCjPHRks5sDtFXgaJpZM4N43gK .

mirceanis avatar Jun 13 '17 19:06 mirceanis

You can extend device component. I've implemented a similar function to send all the logcat entries to Graylog based on ElasticSearch.

thinkhy avatar Jun 18 '17 13:06 thinkhy

Good answer by @mirceanis! Closing.

sorccu avatar Sep 05 '17 14:09 sorccu