devroom.io/drafts/2010-10-12-sentestcase-xcbuildlogcommandinvocationsection-error-in-xcode-32.md

29 lines
1.1 KiB
Markdown
Raw Normal View History

2013-03-22 22:53:57 +00:00
---
title: "SenTestCase: XCBuildLogCommandInvocationSection error in XCode 3.2"
kind: article
slug: sentestcase-xcbuildlogcommandinvocationsection-error-in-xcode-32
created_at: 2010-10-12
tags:
- iphone
- sdk
- xcode
---
Today I wanted to add some unit tests to an iPhone project I'm working on. I came across the following error when trying to run my tests:
An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance 0x2017a22a0
An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSectionRecorder endMarker]: unrecognized selector sent to instance 0x201719b60
~
It appears there's a bug in XCode somewhere that prevents unit tests to run
(yeah, I know, there should be tests for that at Apple). Anyway, you can
easily fix this.
Double-click on _Run Script_ for your testing target. Replace
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
with
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out
Now, build your test target again and you should be good to go.