Android : SQLiteOpenHelper Testing framework

on Thursday, August 14, 2014


I have currently implemented a module for persistent storage in an Android app using SQLite database.The source code contains many other modules.Unit Tests haven’t been done for any of them yet.Please suggest me ways to do unit tests for the class extending SQLiteOpenHelper class. 1.Should I go for Android JUnit ? Can Android SQLite be mocked using EasyMock/Mockito ? I tried a lot earlier to mock Android objects using mocking frameworks but dint succeed. 2.Should I use RoboElectric ? Does RoboElectric work in case of SQLiteOpenHelper class too ? 3.Should I be creating a separate “Android Test Project” or have the unit test code in the same Android Project ?


0 comments:

Post a Comment