Group Group Group Group Group Group Group Group Group

Sprite Kit app Unit Testing

#1

Out of curiosity, what unit testing strategies are people using for SpriteKit apps?

At the moment I’m testing my helper classes (abstract data types, extensions, etc) and game logic classes (state machines, game rules, etc) - all non-UI classes. Are people doing any UI testing of SpriteKit apps using the XCTest framework? From Google searches it appears this wasn’t well supported a year or so ago, I can’t find anything more recent about it.

Thanks,
Matt

#2

I have the same question. I’ve gone through the 2d Apple Games book and felt slightly at a loss for how to make sure everything is still working in my games.

#3

You can learn more about Apple’s UI testing patterns and techniques in iOS in our testing course:

There is also a handy and easy to use third party library for snapshot testing:

I hope this helps and you can apply all this to your SpriteKit games. Thank you! :]