I have an accessibility service as described here:
http://developer.android.com/training/accessibility/service.html

I would like to create tests for my service.  Since my service reads
window content using AccessibilityNodeInfo objects, I'm most
interested in testing that it does the right thing with screen
changes.  As far as I can tell, a regular ServiceTestCase won't work
for me, since I don't want control over the lifecycle of my service.
Instead, it looks as though my service is started when the system's
AccessibilityManagerService binds to it and sends a "setConnection"
message.  I would like to be able to have the system invoke my service
in the same way during testing.  However, when I use test project that
instruments the project containing my accessibility service, the
service never seems to start - I'm guessing because running under
instrumentation blocks the normal lifecycle?

Is anyone else dealing with this issue?  Right now, I can write tests
without instrumentation - basically I have a test project that moves
between some test screens.  I start my accessibility service
separately and query it through an external interface.  However, if
possible I'd like a way to be able to run tests in the same process as
my accessibility service and have things still work as expected.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to