來自非死book的iOS項目構建工具:xctool

jopen 11年前發布 | 20K 次閱讀 xctool iOS開發 移動開發

xctool 用以替換蘋果公司的 xcodebuild 工具來簡化 iOS 和 Mac 項目的構建和測試。要使用該工具必須安裝 Xcode 命令行工具:From Xcode, install via Xcode → Preferences → Downloads.

  • Runs the same tests as Xcode.app.

    Surprisingly, Apple's command-line xcodebuild tool does not run your product's tests the same way as Xcode.app. xcodebuild doesn't understand which targets in your scheme are test targets, which test suites or cases you might have disabled in your scheme, or how to run simulator-based, application tests.

    If you use application tests, you've probably seen xcodebuild skipping them with this message:

    Skipping tests; the iPhoneSimulator platform does not currently support
    application-hosted tests (TEST_HOST set).

    xctool fixes this - it looks at your Xcode scheme and is able to reproduce the same test run you would get with Xcode.app via Cmd-U or Product → Test, including running application tests that require the iOS simulator.

  • Structured output of build and test results.

    xctool captures all build events and test results as structured JSON objects. If you're building a continuous integration system, this means you don't have to regex parse xcodebuild output anymore.

    Try one of the Reporters to customize the output or get the full event stream with the -reporter json-stream option.

  • Human-friendly, ANSI-colored output.

    xcodebuild is incredibly verbose, printing the full compile command and output for every source file. By default, xctool is only verbose if something goes wrong, making it much easier to identify where the problems are.

    Example:

    pretty output

  • Faster, parallelized test runs.

    xctool can optionally run all of your test bundles in parallel, speeding up your test runs significantly. At 非死book, we've seen 2x and 3x speed ups by parallelizing our runs.

    Use the -parallelize option with run-tests or test to enable. See Parallelizing Test Runs for more info.

項目主頁:http://www.baiduhome.net/lib/view/home/1387626597562

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!