controlling the camera in test

瀏覽次數:1,712 次
跳到第一則未讀訊息

Marcus Chen

未讀,
2011年3月18日 中午12:44:232011/3/18
收件者: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

未讀,
2011年3月18日 下午1:11:212011/3/18
收件者: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

未讀,
2011年3月18日 下午5:26:262011/3/18
收件者: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

未讀,
2011年3月22日 下午3:00:542011/3/22
收件者: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

未讀,
2011年3月28日 凌晨4:33:082011/3/28
收件者:robotium-...@googlegroups.com
Interesting. Isn't this something you could just publish openly on
GitHub, for example? :)

Regards,
Chris

回覆所有人
回覆作者
轉寄
0 則新訊息