XCode から自分のプロジェクトで ocunit を動作させようとしています。単体テストでもデバッグする必要があるため、セットアップを自動化するスクリプトを使用しています (以下を参照)。リソースの下のプロジェクトに含め、名前を実行したい .ocunit ファイルに変更します。
私が得る問題は、バンドルファイルが見つからないため、エラーが発生することです。XCodeとobjective-cについて手がかりを持っている人は誰でもそれを見て、何が悪いのか教えてもらえますか. また、実行する必要がある .ocunit ファイルをどのように作成すればよいでしょうか。iPhone 用の新しい単体テスト ターゲットを設定し、それにテストを追加することによって、または?
iPhoneの開発を始めたばかりで、すぐに起動して実行する必要があるので、誰かが手がかりを持っていることを願っています
アップルスクリプト
-- The only customized value we need is the name of the test bundle
tell me to activate
tell application "Xcode"
activate
set thisProject to project of active project document
tell thisProject
set testBundleName to name of active target
set unitTestExecutable to make new executable at end of executables
set name of unitTestExecutable to testBundleName
set path of unitTestExecutable to "/Applications/TextEdit.app"
tell unitTestExecutable
-- Add a "-SenTest All" argument
make new launch argument with properties {active:true, name:"-SenTest All"}
-- Add the magic
set injectValue to "$(BUILT_PRODUCTS_DIR)/" & testBundleName & ".octest"
make new environment variable with properties {active:true, name:"XCInjectBundle", value:injectValue}
make new environment variable with properties {active:true, name:"XCInjectBundleInto", value:"/Applications/TextEdit.app/Contents/MacOS/TextEdit"}
make new environment variable with properties {active:true, name:"DYLD_INSERT_LIBRARIES", value:"$(DEVELOPER_LIBRARY_DIR)/PrivateFrameworks/DevToolsBundleInjection.framework/DevToolsBundleInjection"}
make new environment variable with properties {active:true, name:"DYLD_FALLBACK_FRAMEWORK_PATH", value:"$(DEVELOPER_LIBRARY_DIR)/Frameworks"}
end tell
end tell
end tell