Xcode 7: Profiling Unit Tests in Instruments

January 26th, 2016

Filed under: Instruments, Xcode | 1 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.

Tags: ,

One thought on “Xcode 7: Profiling Unit Tests in Instruments

  1. Amanda Chua says:

    Great information. Since last week, I am gathering details about xcode experience. There are some amazing details on your blog which I didn’t know. Thanks.

Leave a Reply

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