What you can do is to create for each test case your dummy DB. For
doing this there is a pretty cool tool available called SQLite Manager
(it's a FireFox plugin). You can populate your DB with this tool and
save it in a folder for your test cases. Something like

Testcases/testCase1/yourDB.db
Testcases/testCase2/yourDB.db
Testcases/testCase3/yourDB.db
....

In this case you have not to rename your DBs all the time.

After you are done with populating your DBs, you can use the adb push
tool to push your DB in the specific folder in which normally your DB
is stored.

In case of you want to pull an initial version of your DB from your
device, use the adb pull. Then load the DB with SQLite Manager and do
your changes.

You find the DB in the following folder:

/data/data/<your application>/databases

I hope, it is not too confusing what I try to describe. If yes,
contact me and I try to do a better job!

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Aug 1, 5:02 pm, Rod <[email protected]> wrote:
> using Android 1.5 SDK with eclipse under ubuntu 9.04.
>
> I am writing an app which saves rows of data in a contentprovider
> which is built on an sqlitedatabase.   I need to test some
> behavior of the app when the db is initially empty.  Once my app
> puts stuff in the db, it will not be empty the next time I restart
> my app  so I can't conveniently test the db empty case.
>
> I was wondering if (since I'm only testing with the emulator
> on my PC) I can go to a dir on my local PC disk and delete the
> file which contains the DB before I restart my app so that I
> can more easily test the app init for the case where the DB is empty?
> Can you tell me where the sqlitedb file for my content provider is
> at in my local dir structure?
>
> Is there an easier way to do what I am trying to do?
>
> Thanks,
> Rod
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to