UI Testing

Reading time ~1 minute

As part of the process of building Table Talk Quiz, I want to try to adhere to BDD. What that means for me in practical terms is that I want to write application code only after I have a test that is failing. The failing test may need a functioning piece of code to pass, but it might also need a piece of UI. For example, the first thing Table Talk Quiz will need is a start button to start the game, and I want have a test that verifies that the start button exists.

Xcode UI Testing

In Xcode 7 UI Testing is natively supported. Previous to this version of Xcode you had to use an external tool like Frank or Kiwi. I tried these and other and while a diehard BDD practitioner might wrestle with them to build a project, the lack of integration into Xcode made sticking to them too much of a hassle. But now Xcode supports a UI Testing target with APIs for testing and driving your app. Yay, sort of. The first thing you will notice is that there is no documentation. There are the headers and someone has run the doc scripts on them and posted them, but there are no official guide or API documentation. Appleā€™s support of testing is like its support of gaming; it throws little bones, but never gives you all the tools to make you feel like a first class citizen.

From watching the WWDC UI Testing video I wrote this as my first test:

func testStartButtonExists() {
    let app = XCUIApplication()
    let startButton = app.buttons["start"]

I have a failing test, yay! Now on to making that test pass.

How Do I Document?

I don't have an answer to the question. I'm just riffing here. Trying to figure out how to create value for a yet to be determined audien...… Continue reading

Alexa Skill - Part 4

Published on September 19, 2018

Alexa Skill - Part 3

Published on September 16, 2018