How to use xcodebuild with -only-testing and -skip-testing flag?

后端 未结 5 1885
误落风尘
误落风尘 2020-12-15 06:52

I\'ve noticed that there are two options in xcodebuild\'s man page.

-only-testing:TEST-IDENTIFIER       

constr

5条回答
  •  醉梦人生
    2020-12-15 07:16

    You can check the video https://developer.apple.com/videos/play/wwdc2016/409/

    I used it like this:

    -only-testing:UITests/TC_TextArea/test1

    for my tests tree. Works fine

    Full command looks as follows:

    command = 'xcodebuild test 
    -workspace ' + pathToProjectWorkspaceFolder + '/project.xcworkspace 
    -scheme yourApp.app 
    -destination "platform=iOS,name=' + deviceName + '" 
    -only-testing:UITests/TC_TextArea/test1'
    

提交回复
热议问题