chennaione / sugar

Insanely easy way to work with Android Database.
http://satyan.github.com/sugar/
MIT License
2.62k stars 583 forks source link

Instrumentation tests setup. #638

Open macarran opened 8 years ago

macarran commented 8 years ago

Hi! First of all let me start by letting you know that we are very happily using SugarORM for a school project, this is a really useful and functional library.

We are now trying to setup some Espresso tests and had a few questions:

1- Is it possible to use another database for testing purposes? In the app's manifest we specify the following: <meta-data android:name="DATABASE" android:value="production.db" />

Is there any way we can use another database for instrumentation tests?

2- As a more general question, what is the recommended way of setting up sugarORM for instrumentation tests? We would not like to mess up with the actual database being used in the app when running tests and we would like to be able to clear the database before a test case starts.

Any help is much appreciated.

maslick commented 7 years ago

same question