unit testing - Is it possible to find out if an Android application runs as part of an instrumentation test -
is there runtime check application find out if runs part of instrumentation test?
background: our application performs database sync when starting. should happen when started regularly. interferes instrumentation tests testing db sync. not surprisingly.
and other tests it's waste of cpu cycles.
if you're using activityunittestcase, set custom application object setapplication, , have flag in there switch database sync on or off? there's example of using custom application object on blog:
http://www.paulbutcher.com/2011/03/mock-objects-on-android-with-borachio-part-3/
Comments
Post a Comment