View a markdown version of this page

AWS Device Farm에서의 Appium Java TestNG 테스트 문제 해결 - AWS Device Farm

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

AWS Device Farm에서의 Appium Java TestNG 테스트 문제 해결

다음 항목에서는 Appium Java TestNG 테스트를 업로드하는 동안 발생하는 오류 메시지를 나열하고 각 오류를 해결하기 위한 해결 방법을 권장합니다.

업로드 오류

Appium Java TestNG 테스트를 업로드할 때 다음과 같은 오류가 발생할 수 있습니다.

APPIUM_JAVA_TESTNG_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

    자세한 내용은 Device Farm에서 Appium 테스트 자동 실행 단원을 참조하세요.

APPIUM_JAVA_TESTNG_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

    자세한 내용은 Device Farm에서 Appium 테스트 자동 실행 단원을 참조하세요.

APPIUM_JAVA_TESTNG_TEST_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

    자세한 내용은 Device Farm에서 Appium 테스트 자동 실행 단원을 참조하세요.

APPIUM_JAVA_TESTNG_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

    자세한 내용은 Device Farm에서 Appium 테스트 자동 실행 단원을 참조하세요.

APPIUM_JAVA_TESTNG_TEST_PACKAGE_CLASS_FILE_MISSING_IN_TESTS_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. jar 파일에서 파일을 추출하려면 다음 명령을 실행합니다.

    $ jar xf acme-android-appium-1.0-SNAPSHOT-tests.jar
  4. 파일을 성공적으로 추출한 후 다음 명령을 실행합니다.

    $ 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

    자세한 내용은 Device Farm에서 Appium 테스트 자동 실행 단원을 참조하십시오.

인사이트 테스트

인사이트를 테스트하도록 옵트인하면 Device Farm은 실행 및 그 아래의 각 작업에 대한 요약 보고서를 생성합니다. 서비스가 보고서를 생성할 수 없는 경우 인사이트 보고서 상태는 SKIPPED 또는 이고 보고서 메시지ERRORED에 이유가 설명되어 있습니다. Appium Java TestNG 테스트에 대한 인사이트를 생성할 때 다음 메시지가 발생할 수 있습니다.

작업이 완료될 때까지 실행되지 않았습니다.

Unable to generate test insights because the job was status.

작업이 성공하지 못한 상태(상태STOPPED, ERRORED또는 SKIPPED)로 종료되었으므로 요약할 결과가 없었습니다. 실패한 상태로 끝나는 실행은 여전히 인사이트를 수신합니다.

이 문제를 해결하려면 작업이 완료될 때까지 실행되지 않은 이유를 조사합니다. 대부분의 경우 작업 자체의 message 필드는 작업이 완료되지 않은 이유를 설명할 수 있습니다.

결과에 테스트 사례가 포함되어 있지 않음

Test insights could not be generated. The testng-results.xml file was parsed successfully but contained no test cases.

결과 아티팩트가 성공적으로 구문 분석되었지만 테스트 사례가 0개 포함되어 있습니다.

이 문제를 해결하려면 테스트 제품군에 하나 이상의 테스트 사례가 포함되어 있고 결과가 아래에 올바르게 저장되어 있는지 확인합니다$DEVICEFARM_LOG_DIR.

테스트 출력이 지원되는 최대 크기를 초과합니다.

Unable to generate test insights: test output "testng-results.xml" exceeds the maximum supported size of 1GB.

testng-results.xml은 1GB보다 큽니다.

이 문제를 해결하려면 로그 또는 첨부 파일을 잘라내어 testng-results.xml 크기를 1GB 미만으로 줄입니다.

testng-results.xml 파일을 찾을 수 없음

Unable to generate test insights. The test results file (testng-results.xml) was not found.

testng-results.xml 파일(TestNG 루트 서명이 있는 XML 항목도 없음)을 찾을 수 없습니다.

이 문제를 해결하려면 TestNG XML을 아티팩트 디렉터리($DEVICEFARM_LOG_DIR)로 내보내도록 프레임워크를 구성합니다.

testng-results.xml 파일을 처리할 수 없음

Test insights could not be generated because of an error while processing testng-results.xml.

XML 파일의 형식이 잘못되었거나 구문 분석할 수 없습니다.

이 문제를 해결하려면 파일이 표준 TestNG 보고서 형식의 올바른 형식의 XML인지 확인합니다.