Xcode 7: Profiling Unit Tests in Instruments

January 26th, 2016

Filed under: Instruments, Xcode | Be the first to comment!

I learned about this tip from an Apple engineer on Apple’s developer forums and felt like sharing it here. Xcode 7 lets you profile unit tests in Instruments, using the following steps:

  1. Open the test navigator.
  2. Right-click on a test or a group of tests in the test navigator.
  3. Choose Profile “testMethod”, where testMethod is the name of the unit test or group of tests.

At this point Instruments will launch. You’ll be able to choose an instrument and profile tests the same way you profile applications in Instruments.

Facebooktwittergoogle_plusredditmail

Tags: ,


Leave a Reply

Your email address will not be published. Required fields are marked *