Testing cocos2d iPhone with Calabash-iOS

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?

Kalabash still turned me off because he says that he will only work with a simulator, which is not enough, and also if the devices I have to use a service that just sounds like a problem. Any clean solution?

After completing this tutorial, 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 can test your application on real, non-jailbroken iOS devices through 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 just need to try this myself ...

Edit 2: I got it. Even connecting to a remote device that is not even connected to a computer (it just needs to be in one WIFI). When connected to a device, it helps to use the UDID of the device, this was not indicated in the calabash-ios docs, or I skipped this. For those who come 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 ip with the ip of your device, udid and BUNDLE_ID, which should be the target name (I think).

My current question is: how would I identify cocos2d things like CCMenu, CCSprite, etc.? All of them seem to support access identifiers, and I am sure that part of Ruby-iOS can find something under the hood - in turn, this should allow writing tests that interact with cocos2d elements.

0
source share

Source: https://habr.com/ru/post/1394938/


All Articles