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

后端 未结 5 1882
误落风尘
误落风尘 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:00

    To test an application you need to go with the two steps:

    1. build the application
        xcodebuild build-for-testing \
            -workspace "" \
            -scheme "" \
            -destination "platform=iOS Simulator,name=,OS=" \
            -derivedDataPath "All"
    
    1. test it without building
        xcodebuild test-without-building \
            -xctestrun "All/Build/Products/_iphonesimulator-x86_64.xctestrun" \
            -destination "platform=iOS Simulator,name=,OS=" '-only-testing:'  \
            -derivedDataPath 'build/reports/'
    

    Here, indicates the TEST-IDENTIFIER that means
    How many categories or how many test cases under a category you want to run, that should be included under a test bundle[]

提交回复
热议问题