翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWS Device Farm での Appium Java JUnitテストのトラブルシューティング
次のトピックでは、Appium Java JUnitテストのアップロード中に発生するエラーメッセージを一覧表示し、各エラーを解決するための回避策を推奨します。
注記
以下の手順は Linux x86_64 および Mac を対象にしています。
APPIUM_JAVA_JUNIT_TEST_PACKAGE_UNZIP_FAILED
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
テストZIPファイルを開くことができませんでした。ファイルが有効であることを確認して、もう一度お試しください。
エラーなしでテストパッケージを解凍できることを確かめます。次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
有効な Appium Java JUnitパッケージは、次のような出力を生成する必要があります。
. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar
詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUM_JAVA_JUNIT_TEST_PACKAGE_DEPENDENCY_DIR_MISSING
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
dependency-jars のディレクトリがテストパッケージ内に見つかりませんでした。テストパッケージを解凍し、dependency-jars ディレクトリがパッケージ内にあることを確認して、もう一度やり直してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
Appium Java JUnitパッケージが有効な場合は、作業
dependency-jars
ディレクトリ内に ディレクトリがあります。. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `—
dependency-jars
(this is the directory that contains all of your dependencies, built as JAR files) |— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUMJAVA_JUNIT_TESTPACKAGE__JARMISSING__IN_DEPENDENCY_DIR
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
dependency-jars ディレクトリツリーに JAR ファイルが見つかりませんでした。テストパッケージを解凍してから dependency-jars ディレクトリを開き、少なくとも 1 つのJARファイルが ディレクトリにあることを確認して、もう一度試してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
Appium Java JUnitパッケージが有効な場合、
dependency-jars
ディレクトリ内に少なくとも 1 つのjar
ファイルがあります。. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |—
com.some-dependency.bar-4.1.jar
|—com.another-dependency.thing-1.0.jar
|—joda-time-2.7.jar
`—log4j-1.2.14.jar
詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUM_JAVA_JUNIT_TEST_PACKAGE_TESTS_JAR_FILE_MISSING
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
テストパッケージ内に *-tests.jar ファイルが見つかりませんでした。テストパッケージを解凍し、パッケージ内に少なくとも 1 つの *-tests.jar ファイルがあることを確認して、もう一度やり直してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
Appium Java JUnitパッケージが有効な場合は、この例
acme-android-appium-1.0-SNAPSHOT-tests.jar
のように少なくとも 1 つのjar
ファイルがあります。ファイルの名前は異なる場合がありますが、 で終わる必要があります–tests.jar
。. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |—
acme-android-appium-1.0-SNAPSHOT-tests.jar
(this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUMJAVA_JUNIT_TESTPACKAGE__CLASS_FILE_MISSING_IN_TESTS_JAR
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
テストファイル内にクラスJARファイルが見つかりませんでした。テストパッケージを解凍し、テストJARファイルのjarを解除して、少なくとも 1 つのクラスファイルが JAR ファイル内にあることを確認して、もう一度試してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
この例では、 のような jar ファイルが少なくとも 1 つ見つかり
acme-android-appium-1.0-SNAPSHOT-tests.jar
ます。ファイルの名前は異なる場合がありますが、 で終わる必要があります–tests.jar
。. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |—
acme-android-appium-1.0-SNAPSHOT-tests.jar
(this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar -
ファイルを正常に抽出したら、次のコマンドを実行すれば作業ディレクトリツリーに少なくとも 1 つのクラスがあるはずです:
$ tree .
次のような出力が表示されます:
. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |-
one-class-file.class
|- folder | `-another-class-file.class
|— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUM_JAVA_JUNIT_TEST_PACKAGE_JUNIT_VERSION_VALUE_UNKNOWN
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
JUnit バージョン値が見つかりませんでした。テストパッケージを解凍して dependency-jars ディレクトリを開き、JUnitJARファイルが ディレクトリ内にあることを確認して、もう一度試してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍すると、次のコマンドを実行すれば、作業ディレクトリのツリー構造を見つけることができます:
tree .
出力は次のようになります:
. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |—
junit-4.10.jar
|— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jarAppium Java JUnitパッケージが有効な場合は、
junit-4.10.jar
この例の jar ファイルと同様のJUnit依存関係ファイルがあります。名前はキーワードjunit
とそのバージョン番号で構成されている必要があります。この例では 4.10 です。詳細については、「Appium テストと AWS Device Farm」を参照してください。
APPIUM_JAVA_JUNIT_TEST_PACKAGE_INVALID_JUNIT_VERSION
次のメッセージが表示された場合は、下の手順に従って問題を解決してください。
警告
JUnit バージョンが、サポートしている最小バージョン 4.10 よりも低いことがわかりました。JUnit バージョンを変更して、もう一度試してください。
次の例では、パッケージの名前は zip-with-dependencies.zip です。
-
テストパッケージを作業ディレクトリにコピーし、次のコマンドを実行します:
$ unzip zip-with-dependencies.zip
-
正常にパッケージを解凍したら、次のコマンドを実行して作業ディレクトリのツリー構造を見つけることができます:
$ tree .
junit-4.10.jar
この例の のようなJUnit依存関係ファイルとそのバージョン番号があります。この例では 4.10 です。. |— acme-android-appium-1.0-SNAPSHOT.jar (this is the JAR containing everything built from the ./src/main directory) |— acme-android-appium-1.0-SNAPSHOT-tests.jar (this is the JAR containing everything built from the ./src/test directory) |— zip-with-dependencies.zip (this .zip file contains all of the items) `— dependency-jars (this is the directory that contains all of your dependencies, built as JAR files) |—
junit-4.10.jar
|— com.some-dependency.bar-4.1.jar |— com.another-dependency.thing-1.0.jar |— joda-time-2.7.jar `— log4j-1.2.14.jar注記
テストパッケージで指定されたJUnitバージョンが、サポートしている最小バージョン 4.10 よりも低い場合、テストが正しく実行されないことがあります。
詳細については、「Appium テストと AWS Device Farm」を参照してください。