views:

233

answers:

1

What is the easiest way to create some kind of test harness for Android apps and to be able to visualize (even on the emulator) what is going into the db? I want to test things like constraints, look at the data, unit test methods, etc.

Is there any kind of GUI tool that I can hook up to the emulator to be able to look at the db of a particular app while I'm developing/testing, or are my only options the adb shell and creating test Activities within my app?

+4  A: 

There's no db GUI AFAIK, you can invoke sqlite3 from adb shell as you probably know already. In automated tests you don't normally need to visually look at what's going on anyway; checks are written in the test code.

One class that is useful if you're using the db in a ContentProvider is ProviderTestCase2. It basically creates a separate temporary db for the tests.

Mirko Nasato