5

I am looking to automate testing for home-screen widgets. I have looked at android testing page, and the InstrumentationTestRunner class. I have also looked at CTS source code; but I have not been able to find anything useful.

The closest I could find was this Robolectric ShadowAppWidgetManager, but I am not sure how I would use it.

Could you please share how you test the app widgets? Is there any framework or library that I can utilize?

Thanks a lot for your help!

Chaitanya
  • 2,039
  • 4
  • 25
  • 32

1 Answers1

0

I think maybe a good way is to make a separate test project that tests out the functionality of your widget and reports test/fails in a file that later you can "adb pull".

Compilation can be done via command line & automation via ant. Also you can launch and android simulator via command line too an use adb to install the apk, run the app, and get results via command line. A lot of work I agree. The nice thing is the testing part code wise is independent of being in a simulator and very easily adapted to install on a real device.

over_optimistic
  • 1,399
  • 2
  • 18
  • 27