Testing cocos2d iPhone using Calabash-iOS

我的未来我决定 提交于 2019-12-11 19:19:29

问题


Some people suggested https://github.com/calabash/calabash-ios for iOS tests. I am using cocos2d-iphone, can I write tests for it using calabash?

Still calabash turned me off because it says it will only work with the simulator which is not enough and also if devices I have to use a service which just sounds like trouble. Any clean solution?

After completing this guide you will be able to run tests locally against the iOS Simulator. You can also interactively explore and interact with your application using the Calabash console.

Finally, you will be able to test your app on real, non-jailbroken iOS devices via the LessPainful service.

Edit: https://github.com/calabash/calabash-ios/wiki/07-Testing-on-physical-iDevices suggests that device testing is possible... I guess I'll just have to try it myself...

Edit 2: I did get it all working. Even hooking up to a remote device that is not even plugged into the computer (just needs to be on same WIFI). When hooking up to the device it helps using the UDID of the device, this was not stated on calabash-ios docs, or I missed that. For anyone coming here later, this is the final command that will work:

DEVICE_ENDPOINT=http://192.168.36.180:37265 BUNDLE_ID=build/tabeyou-cal DEVICE_TARGET=thelongudidofyourdevicegoeshere OS=ios6 cucumber

Just replace the ip to the ip of your device, the udid, and BUNDLE_ID which should be the target name (I think).

My current question is, how would I identify cocos2d stuff like CCMenu, CCSprite etc? These all seem to support accessibility identifiers and I'm sure the Ruby-iOS part could find anything under the hood - in turn that should make it possible to write tests interacting with cocos2d elements.

来源:https://stackoverflow.com/questions/16955365/testing-cocos2d-iphone-using-calabash-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!