AWS Device Farm의 Appium Java JUnit 테스트 문제 해결 - AWS Device Farm

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

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입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ 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입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ 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 단원을 참조하십시오.

APPIUM_JAVA_JUNITTEST_PACKAGE_JAR_MISSING_IN_DEPENDENCY_DIR

다음 메시지가 표시되면 다음 단계에 따라 문제를 해결하세요.

주의

dependency-jars 디렉터리 트리에서 JAR 파일을 찾을 수 없습니다. 테스트 패키지의 압축을 푼 다음 dependency-jars 디렉터리를 열고 디렉터리에 JAR 파일이 하나 이상 있는지 확인한 다음 다시 시도하세요.

다음 예제에서 패키지의 이름은 zip-with-dependencies.zip입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ tree .

    Appium Java JUnit 패키지가 유효한 경우 dependency-jars 디렉터리에서 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 파일을 찾을 수 없습니다. 테스트 패키지의 압축을 풀고 패키지에 *-tests.jar 파일이 하나 이상 있는지 확인한 다음 다시 시도하세요.

다음 예제에서 패키지의 이름은 zip-with-dependencies.zip입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ tree .

    Appium Java JUnit 패키지가 유효한 경우이 예제acme-android-appium-1.0-SNAPSHOT-tests.jar와 같은 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 단원을 참조하십시오.

APPIUM_JAVA_JUNITTEST_PACKAGE_CLASS_FILE_MISSING_IN_TESTS_JAR

다음 메시지가 표시되면 다음 단계에 따라 문제를 해결하세요.

주의

테스트 파일 내에서 클래스 JAR 파일을 찾을 수 없습니다. 테스트 패키지의 압축을 푼 다음 테스트 JAR 파일의 jar를 해제하고 하나 이상의 클래스 파일이 JAR 파일에 있는지 확인한 다음 다시 시도하세요.

다음 예제에서 패키지의 이름은 zip-with-dependencies.zip입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ tree .

    예제acme-android-appium-1.0-SNAPSHOT-tests.jar와 같이 하나 이상의 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
  3. 파일을 성공적으로 추출한 후에는 다음 명령을 실행하여 작업 디렉토리 트리에서 하나 이상의 클래스를 찾아야 합니다.

    $ 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 디렉터리를 열고 JUnit JAR 파일이 디렉터리 내에 있는지 확인한 다음 다시 시도하세요.

다음 예제에서 패키지의 이름은 zip-with-dependencies.zip입니다.

  1. 테스트 패키지를 작업 디렉터리에 복사한 후 다음 명령을 실행하세요.

    $ unzip zip-with-dependencies.zip
  2. 패키지의 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉토리 트리 구조를 찾을 수 있습니다.

    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.jar

    Appium 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입니다.

  1. 작업 디렉터리에 테스트 패키지를 복사한 후 다음 명령을 실행합니다.

    $ unzip zip-with-dependencies.zip
  2. 패키지 압축을 성공적으로 푼 후에는 다음 명령을 실행하여 작업 디렉터리 트리 구조를 찾을 수 있습니다.

    $ 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 단원을 참조하십시오.