How to figure out test environment in android programmatically
<p>I am working with multiple content providers in my application. All of these content providers talk to a singleton instance of SQliteOpenHelper (which works with application context). This works great in production. When it comes to testing (Content provider testing specifically), having a singleton instance of SQLiteOpenHelper is not good idea as it does not create clean slate database for every test run</p>

<p>In content provider code, I want to figure whether I am in a test mode or not, depending on that I will decide to switch between a singleton open hleper or per context open helper</p>

<p>Are there any good ways to do it..does android provide any api to determine if the app is in test mode ?</p>
