2

so I am trying to learn test automation on an Android, Basically I want to learn how to use Google's UI Automator, however, it seems like all tutorial that I could find requires me to have access to the source code of the app under test.

I found this repo AndroidTestWithoutSource it uses espresso but requires me to re-sign the APK.

My target environment basically is a production test environment I mean like install the app under test on an android device then connect the device to my PC through ADB, for learning purposes I like to test youtube or even the native settings app.

Is my goal even possible with UI Automator? like being able to test apps installed in the device like appium does?

I would really appreciate a sample to that launch youtube app just to get me started.

Thank you!

Darren
  • 92
  • 10

1 Answers1

0

Yes you can for instance use UI Automator viewer to get the resource ids (textview ids, edittext ids, etc) you want to click or act on.

After that you can write a UI Automator test that starts the app you're going to test (having the package name) and acts on the resource ids you previously collected.

Hope this helps.

Lino
  • 5,084
  • 3
  • 21
  • 39