Why unit tests
A teammate says they'd rather build one more feature than spend the time writing tests. How would you make the case for unit tests?
A teammate says they'd rather build one more feature than spend the time writing tests. How would you make the case for unit tests?
Unit tests catch regressions automatically, make refactoring safe, force a testable design by separating dependencies, and work as executable documentation. The cost is a few seconds of build and run; the benefit is one bug that never reaches users.
TestingMultiple choiceIntro
Which conditions does a method need before XCTest recognizes and runs it as a test?…
#xctest
TestingShort answerIntro
What's the difference between unit tests, integration tests, and UI tests?
#unit-test
TestingShort answerAdvanced
You have dozens of UI tests that are slow and break often. How would you restructure the…
#unit-test
TestingMultiple choiceBasics
In the XCTestCase below, which order are the calls made in when testA and testB run? …
#xctest