Using XCTest performance tests (Debug vs Release builds)
Using XCTest performance tests (Debug vs Release builds)
- Subject: Using XCTest performance tests (Debug vs Release builds)
- From: Jens Alfke <email@hidden>
- Date: Mon, 06 Feb 2017 11:21:28 -0800
[Re-sending now that the lists are back up…]
The performance-testing API in XCTest is interesting — -measureBlock: and so forth. However, unit tests should be run on debug builds, while performance has to be measured on an optimized (release) build. So combining the two in one run doesn’t make sense.
How are people working around this? My first thought is to add a second unit-tests target for the perf tests, and set its scheme to use the Release configuration. But I suspect Xcode won’t let me set up two test targets on a single main target (how will it know which one to run when I choose Test?) Alternatively I can duplicate my main target’s scheme and set the copy’s configuration to Release; but then I’ll need to wrap “#if DEBUG…#endif” around all the unit tests and “#if !DEBUG” around the perf tests, which is awkward. Is there a better way?
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden