Demo on UI testing for ios game under SpriteKit framework
This is a simple demo on how to perform UI testing on ios game powered by SpriteKit framework.
The idea comes from this stackoverflow answer, where the accessibility materials for elements to be UI-tested are created. That's mean:
-
List all accessible elements contained in the scene
-
Configure settings for each of these elements, especially frame data.
In this demo, there are two scenes (SKScene
) which can transit to each other by navigation buttons (SKSpriteNode
).
Two UI testing targets are cretaed to automatically naviagate between scenes:
-
SpritekitUITestingExampleKIFTests
: implemented by KIF -
SpritekitUITestingExampleUITests
: implemented by Xcode UI Testing Framework
Hope this helps for those who would like to do UI testing on a Spritekit game :)
Thanks to Domsware from Stackoverflow for this awesome idea!