iOS Unit Testing by Example: 54 Don't seem to be getting the print out on tests (Xcode 13.2)

Hey there,

I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>> Launching with real app delegate” when running tests. I’m not getting that in the console during tests. It does print out on a simulator run though. Is this an Xcode 13 thing or possibly something else?

Run tests. Then scroll back in the console output, before " Test Suite ‘All tests’ started"

Apologies, seems UI tests were running right after unit tests and overwrote the console output. All good now :pray:

Oh, now that’s a change in Xcode since I wrote the book: Whenever you start a project and say you want tests, you now get a place for UI tests in addition to unit tests. And just by being there, those UI tests will slow down your feedback. Here’s what I do:

  • Delete the UI test target
  • Delete the UI test code
  • Edit the scheme → Tests → Info and delete the reference to UI tests

In addition, here’s a trick to make test feedback even faster. At that same place editing the scheme, turn off “Debug executable”

You should find things go much faster for you! And that console output won’t get in your way, which will continue to be important.