0
私はiosのテストケースを書いたiosプロジェクトを持っています。swiftからxcodebuildテストコマンドを実行
私は別のosx(swift)コマンドラインツールを作成し、メインファイルからiosプロジェクトのuiテストを実行したいと思います。私は、端末からこのコマンドを実行した場合、正しくIOSプロジェクトのUIテストの実行よりも、
xcodebuild test -project /Users/usernamer/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'
:このため
は、私は、以下のコマンドを使用します。私のosxコマンドラインツールのswiftファイル(新しいOSXプロジェクトで)からコマンドを実行すると、エラーが表示されます。コードは、このコードは、次のエラーが表示さ
import Foundation
func shell(args: String...) -> Int32 {
let task = NSTask()
task.launchPath = "/usr/bin/xcodebuild"
task.arguments = args
task.launch()
task.waitUntilExit()
return task.terminationStatus
}
print("This is test version edit")
shell("xcodebuild test -project /Users/username/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'")
です:
xcodebuild: error: The directory /Users/username/Library/Developer/Xcode/DerivedData/automationProject-brxvyfplrimnekchsaaenmecydkp/Build/Products/Debug does not contain an Xcode project.
Program ended with exit code: 9
here automationProject is the osx project name from where i run my main file to run the ios ui test.
私のエラーは何か私を助けてください。
@Eric Dのおかげで、私はあなたを知っているだろう –
@EricD、実際に起動パスを使って私のios xcode proj dirに切り替えることができますか?私は起動パスとして/ usr/bin/xcodebuildを使うので –