View a markdown version of this page

AWS Device Farm での XCTest UI テストのトラブルシューティング - AWS Device Farm

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

AWS Device Farm での XCTest UI テストのトラブルシューティング

次のトピックでは、XCTest UI テストのアップロード中に発生するエラーメッセージを示し、各エラーを解決するために推奨される回避策を示します。

アップロードエラー

XCTest UI テストをアップロードすると、次のエラーが発生する可能性があります。

XCTEST_UI_TEST_PACKAGE_UNZIP_FAILED

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not open your test IPA file. Please verify that the file is valid and try again.

エラーなしでアプリケーションパッケージを解凍できることを確かめてください。次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    有効な iOS アプリケーションパッケージでは、次のような出力が生成されます:

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PAYLOAD_DIR_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the Payload directory inside your test package. Please unzip your test package, verify that the Payload directory is inside the package, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、Payload ディレクトリは作業ディレクトリ内にあります。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_APP_DIR_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the .app directory inside the Payload directory. Please unzip your test package and then open the Payload directory, verify that the .app directory is inside the directory, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、Payload ディレクトリ内にこの例の swift-sampleUITests-Runner.app のような .app ディレクトリがあります。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PLUGINS_DIR_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the Plugins directory inside the .app directory. Please unzip your test package and then open the .app directory, verify that the Plugins directory is inside the directory, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、Plugins ディレクトリは .app ディレクトリ内にあります。この例では、ディレクトリ名は swift-sampleUITests-Runner.app です。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_XCTEST_DIR_MISSING_IN_PLUGINS_DIR

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the .xctest directory inside the plugins directory. Please unzip your test package and then open the plugins directory, verify that the .xctest directory is inside the directory, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、.xctest ディレクトリは Plugins ディレクトリ内にあります。この例では、ディレクトリ名は swift-sampleUITests.xctest です。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PLIST_FILE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the Info.plist file inside the .app directory. Please unzip your test package and then open the .app directory, verify that the Info.plist file is inside the directory, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、Info.plist ファイルは .app ディレクトリ内にあります。次の例では、ディレクトリ名は swift-sampleUITests-Runner.app です。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PLIST_FILE_MISSING_IN_XCTEST_DIR

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the Info.plist file inside the .xctest directory. Please unzip your test package and then open the .xctest directory, verify that the Info.plist file is inside the directory, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI アプリケーションパッケージが有効な場合、Info.plist ファイルは .xctest ディレクトリ内にあります。以下の例では、ディレクトリ名は swift-sampleUITests.xctest です。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_CPU_ARCHITECTURE_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not the CPU architecture value in the Info.plist file. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the key "UIRequiredDeviceCapabilities" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. CPU アーキテクチャの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['UIRequiredDeviceCapabilities']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    ['armv7']

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PLATFORM_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the platform value in the Info.plist. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the key "CFBundleSupportedPlatforms" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. プラットフォームの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['CFBundleSupportedPlatforms']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    ['iPhoneOS']

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_WRONG_PLATFORM_DEVICE_VALUE

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We found the platform device value was wrong in the Info.plist file. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the value of the key "CFBundleSupportedPlatforms" does not contain the keyword "simulator", and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. プラットフォームの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['CFBundleSupportedPlatforms']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    ['iPhoneOS']

    XCTest UI パッケージが有効な場合、値にキーワード simulator を含めることはできません。

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_FORM_FACTOR_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not the form factor value in the Info.plist. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the key "UIDeviceFamily" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. フォームファクタの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['UIDeviceFamily']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    [1, 2]

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PACKAGE_NAME_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the package name value in the Info.plist file. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the key "CFBundleIdentifier" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. パッケージ名の値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['CFBundleIdentifier']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    com.apple.test.swift-sampleUITests-Runner

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_EXECUTABLE_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the executable value in the Info.plist file. Please unzip your test package and then open the Info.plist file inside the .app directory, verify that the key "CFBundleExecutable" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. 実行可能な値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Info.plist') print info_plist['CFBundleExecutable']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    XCTRunner

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_TEST_PACKAGE_NAME_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the package name value in the Info.plist file inside the .xctest directory. Please unzip your test package and then open the Info.plist file inside the .xctest directory, verify that the key "CFBundleIdentifier" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. パッケージ名の値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Plugins/swift-sampleUITests.xctest/Info.plist') print info_plist['CFBundleIdentifier']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    com.amazon.swift-sampleUITests

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_TEST_EXECUTABLE_VALUE_MISSING

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We could not find the executable value in the Info.plist file inside the .xctest directory. Please unzip your test package and then open the Info.plist file inside the .xctest directory, verify that the key "CFBundleExecutable" is specified, and try again.

次の例では、パッケージ名は swift-sample-UI.ipa です。

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.ipa
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    この例の swift-sampleUITests-Runner.app のような .app ディレクトリ内に Info.plist ファイルがあるはずです。

    . `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files)
  3. 実行可能な値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

    Python の場合、次のコマンドを実行して biplist モジュールをインストールできます:

    $ pip install biplist
  4. 次に、Python を開き、次のコマンドを入力します:

    import biplist info_plist = biplist.readPlist('Payload/swift-sampleUITests-Runner.app/Plugins/swift-sampleUITests.xctest/Info.plist') print info_plist['CFBundleExecutable']

    有効な XCtest UI パッケージでは、次のような出力が生成されます。

    swift-sampleUITests

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_MULTIPLE_APP_DIRS

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We found multiple .app directories inside your test package. Please unzip your test package, verify that only a single .app directory is present inside the package, then try again.

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.zip
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合は、.zip テストパッケージ内の例で swift-sampleUITests-Runner.app のように単一の .app ディレクトリのみを見つける必要があります。

    . `--swift-sample-UI.zip--(directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) | `swift-sampleUITests.xctest (directory) | |-- Info.plist | `-- (any other files) `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_MULTIPLE_IPA_DIRS

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We found multiple .ipa directories inside your test package. Please unzip your test package, verify that only a single .ipa directory is present inside the package, then try again.

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.zip
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合は、.zip テストパッケージ内の例で sampleUITests.ipa のように単一の .ipa ディレクトリのみを見つける必要があります。

    . `--swift-sample-UI.zip--(directory) `-- sampleUITests.ipa (directory) `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_BOTH_APP_AND_IPA_DIR_PRESENT

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We found both .app and .ipa files inside your test package. Please unzip your test package, verify that only a single .app or .ipa file is present inside the package, then try again.

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.zip
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合は、.zip テストパッケージ内に sampleUITests.ipa のような .ipa ディレクトリまたは swift-sampleUITests-Runner.app のような .app ディレクトリが見つかります。iOS 用 XCTest UI と Device Farm の統合 のドキュメントで、有効な XCTEST_UI テストパッケージの例を参照できます。

    . `--swift-sample-UI.zip--(directory) `-- sampleUITests.ipa (directory) `-- Payload (directory) `-- swift-sampleUITests-Runner.app (directory) `-- (any other files)

    または

    . `--swift-sample-UI.zip--(directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) `-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

XCTEST_UI_TEST_PACKAGE_PAYLOAD_DIR_PRESENT_IN_ZIP

次のメッセージが表示された場合は、下の手順に従って問題を解決してください。

We found a Payload directory inside your .zip test package. Please unzip your test package, ensure that a Payload directory is not present in the package, then try again.

  1. テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:

    $ unzip swift-sample-UI.zip
  2. 正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:

    $ tree .

    XCTest UI パッケージが有効な場合、テストパッケージ内にペイロードディレクトリは見つかりません。

    . `--swift-sample-UI.zip--(directory) `-- swift-sampleUITests-Runner.app (directory) |-- Info.plist |-- Plugins (directory) `-- (any other files) `-- Payload (directory) [This directory should not be present] |-- (any other files) `-- (any other files)

    詳細については、「iOS 用 XCTest UI と Device Farm の統合」を参照してください。

インサイトをテストする

インサイトのテストをオプトインすると、Device Farm は実行とその下の各ジョブの概要レポートを生成します。サービスがレポートを生成できない場合、インサイトレポートのステータスは SKIPPEDまたは でありERRORED、レポートメッセージにその理由が示されます。XCTest UI テストのインサイトを生成すると、次のメッセージが発生する可能性があります。

ジョブは完了するまで実行されませんでした

Unable to generate test insights because the job was status.

ジョブは成功しない状態 (ステータスSTOPPED、、または SKIPPED) で終了したためERRORED、要約する結果はありませんでした。失敗した状態で終了した実行は、引き続きインサイトを受け取ります。

この問題を解決するには、ジョブが完了まで実行されなかった理由を調べます。多くの場合、ジョブ自体の messageフィールドは、ジョブが完了しなかった理由を説明する可能性があります。

結果にはテストケースが含まれていません

Test insights could not be generated. The xcresult_summary.json file was parsed successfully but contained no test cases.

結果アーティファクトは正常に解析されましたが、テストケースはゼロでした。

この問題を解決するには、テストスイートに少なくとも 1 つのテストケースが含まれ、結果が に正しく保存されていることを確認します$DEVICEFARM_LOG_DIR

テスト出力がサポートされている最大サイズを超えています

Unable to generate test insights: test output "xcresult bundle" exceeds the maximum supported size of 1GB.

xcresult バンドルは 1 GB を超えています。

この問題を解決するには、ログまたは添付ファイルをトリミングして、xcresult バンドルのサイズを 1 GB 未満に減らします。

xcresult バンドルが見つかりませんでした

Unable to generate test insights. The xctestresult bundle file (.xcresult) was not found in the output artifacts.

Device Farm はこのジョブの .xcresultバンドルを見つけることができなかったため、要約する結果はありませんでした。

Device Farm は、 の任意の場所でバンドルを検索します$DEVICEFARM_DERIVED_DATA_PATH。デフォルトの XCTest UI テスト仕様によって自動的に生成されるため、このメッセージは通常、カスタマイズされたテスト仕様がその場所に結果を書き込まなかったことを示します。

バンドルが生成されたかどうかを確認するには、ジョブのカスタマーアーティファクトをダウンロードし、派生データフォルダの下にある .xcresult ディレクトリを探します。

xcresult テスト結果を処理できませんでした

Test insights could not be generated because of an error while processing the .xcresult test results.

Device Farm は .xcresultバンドルを検出しましたが、そこからテスト結果を読み取ることができませんでした。

この問題を解決するには、テストランで有効な.xcresultバンドルが生成されていることを確認します。実行が完了する前にテスト仕様がバンドルを変更、切り捨て、アーカイブしていないこと、およびタイムアウトによって中断されるのではなくxcodebuildコマンドが完了したことを確認します。