In my app, I have an Activity, which is basically a form for the user to enter data which is then inserted into a database table via a `ContentResolver`. How do I test this Activity?
My first attempt was to use `ActivityInstrumentationTestCase2` which gives me full instrumentation to simulate entering data. However, the underlying `ContentProvider` is not closed and destroyed between each test, which leaves the database in an unknown state at the beginning of subsequent tests. My second attempt was to use `ActivityUnitTestCase` and inject a mock context that can clean up the database for each test. However, this doesn't allow me to enter text or click on buttons in the activity as it is never actually drawn on the test device. Does anyone have any suggestions about what else I can try? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

