controlling the camera in test

1,724 views
Skip to first unread message

Marcus Chen

unread,
Mar 18, 2011, 12:44:23 PM3/18/11
to robotium-...@googlegroups.com
Hey guys,
First let me thank you guys for doing such great work. We have converted our regression tests to Robotium test cases and really saved a lot of time. Recently we are hitting a roadblock in converting our test cases that involve the test of photo functionalities. Our app invokes the native camera app to take a photo and provide callback for the camera app to get back to it. I am finding that our Robotium test (solo object) doesn't have a hold on the camera activity. My question is what is the easiest way for my test to get a handle on the camera activity? Examples would be great. Thank you in advance.
 
Regards,
Marcus

Renas Reda

unread,
Mar 18, 2011, 1:11:21 PM3/18/11
to Robotium Developers
Hi,

That is not possible as your test project is locked to your
application. It is not allowed (Android platform restriction) to
interact with other applications, only the one described in the
AndroidManifest.xml of the test project.

Renas

Marcus Chen

unread,
Mar 18, 2011, 5:26:26 PM3/18/11
to Robotium Developers
Makes sense. Has anyone tried to stub in a camera app that replaces
the default one of the device that does nothing but returns a static
photo when called.

Marcus
> > Marcus- Hide quoted text -
>
> - Show quoted text -

Marcus Chen

unread,
Mar 22, 2011, 3:00:54 PM3/22/11
to Robotium Developers
So I have just created a mock camera app for this purpose. Send me an
email if anyone wants to use it and I'll send you the source code.

Marcus
> > - Show quoted text -- Hide quoted text -

Christopher Orr

unread,
Mar 28, 2011, 4:33:08 AM3/28/11
to robotium-...@googlegroups.com
Interesting. Isn't this something you could just publish openly on
GitHub, for example? :)

Regards,
Chris

Reply all
Reply to author
Forward
0 new messages