The Services team had another Ship it Day today! For my project this time around I decided to try something that I have wanted to experiment with for quite some time. The QA team at Uken spends a lot of time performing smoke tests on all of our applications. Smoke tests are essentially a fully run through of all functionality of an application after a new feature gets added to basically ensure that things that were working before continue to function correctly. I thought it would be cool to see if I could write some UI Automation scripts to drive some common functions in Bingo Pop. Even though I don’t typically work directly on game code, this also gave me an excuse to get that codebase up and running on my machine which is always something that is helpful to do when a large part of your job is supporting the development that the game teams do.
As mentioned in an earlier blog post, Bingo Pop is Uken’s only game that is written entirely natively so I decided to use a framework called KIF (Keep it Functional) that was developed by the team at Square. I read a lot of the documentation on the framework and learned that it utilizes the accessibility features of the applications in order to determine what to tap on and insert text into. Unfortunately, many of the UI components in our application did not make use of accessibility labels already so I had to go through and put in a lot of those myself. Once that was complete, I wrote two scripts to perform two common tasks in Bingo Pop.
The first script was designed to complete the game tutorial that is presented to new users. I figured that this would be quite beneficial since the main tutorial rarely changes but it is something that must be played through in order start the game. The second script that I wrote was one that would loop through all items in the store and purchase each product. This did reveal one limitation of the KIF framework, which was that it is unable to interact with any prompts that are initiated by the operating system. In this case, iOS asks users to type in their iTunes credentials in order to complete the purchase.
Even though this was the case, it was pretty cool to see these common tasks running without much user interaction. The project got a really good response from all of the other developers on the team. Now I sit here dreaming about setting up complete automated testing coverage of our applications with multiple devices all running through our continuous integration system, Jenkins. Ok, maybe I am getting ahead of myself but there is always next Ship it Day!