

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

# AWS Device Farm での XCTest UI テストのトラブルシューティング
<a name="troubleshooting-xctest-ui"></a>

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

**注記**  
以下の手順は Linux x86\_64 および Mac を対象にしています。

## XCTEST\_UI\_TEST\_PACKAGE\_UNZIP\_FAILED
<a name="XCTEST_UI_TEST_PACKAGE_UNZIP_FAILED"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PAYLOAD\_DIR\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_PAYLOAD_DIR_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_APP\_DIR\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_APP_DIR_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PLUGINS\_DIR\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_PLUGINS_DIR_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_XCTEST\_DIR\_MISSING\_IN\_PLUGINS\_DIR
<a name="XCTEST_UI_TEST_PACKAGE_XCTEST_DIR_MISSING_IN_PLUGINS_DIR"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PLIST\_FILE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_PLIST_FILE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PLIST\_FILE\_MISSING\_IN\_XCTEST\_DIR
<a name="XCTEST_UI_TEST_PACKAGE_PLIST_FILE_MISSING_IN_XCTEST_DIR"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_CPU\_ARCHITECTURE\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_CPU_ARCHITECTURE_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. CPU アーキテクチャの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PLATFORM\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_PLATFORM_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. プラットフォームの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_WRONG\_PLATFORM\_DEVICE\_VALUE
<a name="XCTEST_UI_TEST_PACKAGE_WRONG_PLATFORM_DEVICE_VALUE"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. プラットフォームの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_FORM\_FACTOR\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_FORM_FACTOR_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. フォームファクタの値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PACKAGE\_NAME\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_PACKAGE_NAME_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. パッケージ名の値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_EXECUTABLE\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_EXECUTABLE_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. 実行可能な値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_TEST\_PACKAGE\_NAME\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_TEST_PACKAGE_NAME_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. パッケージ名の値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_TEST\_EXECUTABLE\_VALUE\_MISSING
<a name="XCTEST_UI_TEST_PACKAGE_TEST_EXECUTABLE_VALUE_MISSING"></a>

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

`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
   ```

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

   ```
   $ 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)
   ```

1. 実行可能な値を見つけるため、Xcode または Python を使用して Info.plist を開くことができます。

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

   ```
   $ pip install biplist
   ```

1. 次に、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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_MULTIPLE\_APP\_DIRS
<a name="XCTEST_UI_TEST_PACKAGE_MULTIPLE_APP_DIRS"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_MULTIPLE\_IPA\_DIRS
<a name="XCTEST_UI_TEST_PACKAGE_MULTIPLE_IPA_DIRS"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_BOTH\_APP\_AND\_IPA\_DIR\_PRESENT
<a name="XCTEST_UI_TEST_PACKAGE_BOTH_APP_AND_IPA_DIR_PRESENT"></a>

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

`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
   ```

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

   ```
   $ tree .
   ```

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

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

    or 

   ```
   .
   `--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 の統合](test-types-ios-xctest-ui.md)」を参照してください。

## XCTEST\_UI\_TEST\_PACKAGE\_PAYLOAD\_DIR\_PRESENT\_IN\_ZIP
<a name="XCTEST_UI_TEST_PACKAGE_PAYLOAD_DIR_PRESENT_IN_ZIP"></a>

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

`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
   ```

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

   ```
   $ 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 の統合](test-types-ios-xctest-ui.md)」を参照してください。