How about UI Test automating?

Anyone who interested in this topic.

Can we expect UI Test tool for cocos2d-x ?
Recently it become more important to automate UI Test for me, but it’s not on cocos2d-x yet.
So now, I am trying to create my own tool.
I’d like to ask you what functions you expect to UI Test tool ?
If I’ve make it done, I’d like to contribute it to cocos2d-x.

Thank you.

2 Likes

Here is the pull request I posted.
It features touch actions which simulates variety of touch gestures as FiniteTimeAction, and also it provides extra command class for CCConsole.

I hope it makes UI test automation closer.

Thank you.

Good job, I think auto mate test will be great for cocos2d-x.

Ideally, cocos2d-x should work with/like this: https://developer.apple.com/videos/play/wwdc2015/406/

“Normal” UI testing like above normally works using accessibility features… so what would be needed is accessibility features to Cocos2d-x… unless it already exist. (maybe it’s enough to use ->setName(“something”) etc
I actually did a similar work on this for Cocos2d-iPhone (2.x I think) a couple of years ago, I mostly forgot how to do all that stuff, but it should definitely be possible. :stuck_out_tongue: At that time I was able to run a small script from my computer and it wirelessly connected to an iPhone, launched the cocos2d-iphone game and maneuvered around menus on its own. I didn’t have a lot of time to continue on that but I too can see a great use/need of such features. Sure, the hardest/impossible part is to make UI test scripts that can successfully play hard action games etc. But even those could be useful to test things like “We can start up the game, start a mission, play for a while, then we will see game over.”. I forgot the name of the framework I was using but such words was the actual wording in the script.