Kodeco Forums

Unit Testing on macOS: Part 1/2

In this Unit testing tutorial for macOS you'll learn how unit tests can help you to write stable code and give you the confidence that changes don't break your code.

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/972-unit-testing-on-macos-part-1-2

Great article! Thank you very much. I’ve always viewed TDD as a daunting topic but this post simplified it down to the point of being a bit less scary. Thanks! (p.s. I think the link at the bottom of the page leading to the other tutorials is broken)

Thanks for the feedback, I was much the same, but once you get into it, it really works. The link is fixed now, but I hope you found part 2 anyway.

Great tutorial !
I always check the subject of new articles on my phone before using Xcode and working on it, but it was so interesting i read it totally on my phone ! Time to try it now :slight_smile:
Thanks again

When I run the tests I get a pop-up informing me that I have to give XCode Helper permission to use Accessibility. Is that expected or do I have something odd in my configuration? I’m using XCode 8 beta 6 and 10.11.6.

I have this enabled too, but I must have given it permission so long ago that I had forgotten. But it makes sense for the UI Tests where Xcode has to be able to perform mouse clicks and keyboard entry. SO I do not think there is anything odd in your system - I think this is essential for UI Testing.

Great tutorial !
But I have found that there are lots of ‘die’ instead of ‘dice’ around the article. Not sure if they are typos or what.
Forgive my poor English, but search for ‘die’ in the article and you will see what I mean.:sweat_smile:

English is a weird language :]
“Die” = one, “Dice” = multiples.

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]