0

I have an appwidget which is used as a button. I would like to thoroughly test it as it launches important activities for my application. How is it possible to do so?

JustCurious
  • 1,848
  • 3
  • 30
  • 57

1 Answers1

1

Off the cuff, I would isolate the smarts that creates the RemoteViews in a separate method that can be called independently of the AppWidgetProvider, just using a Context. Then, you can test the generated RemoteViews using an AndroidTestCase.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491