

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

# AWS Device Farm에서의 Appium Java TestNG 테스트 문제 해결
<a name="troubleshooting-appium-java-testng"></a>

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

**참고**  
다음 지침은 Linux x86\_64 및 Mac을 기반으로 합니다.

## APPIUM\_JAVA\_TESTNG\_TEST\_PACKAGE\_UNZIP\_FAILED
<a name="APPIUM_JAVA_TESTNG_TEST_PACKAGE_UNZIP_FAILED"></a>

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

**주의**  
테스트 ZIP 파일을 열 수 없습니다. 파일이 유효한지 확인하고 다시 시도하세요.

오류 없이 테스트 패키지의 압축을 풀 수 있는지 확인하세요. 다음 예제에서 패키지 이름은 **zip-with-dependencies.zip**입니다.

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

   ```
   $ unzip zip-with-dependencies.zip
   ```

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

   ```
   $ 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 테스트를 Device Farm과 통합](test-types-appium.md) 단원을 참조하세요.

## APPIUM\_JAVA\_TESTNG\_TEST\_PACKAGE\_DEPENDENCY\_DIR\_MISSING
<a name="APPIUM_JAVA_TESTNG_TEST_PACKAGE_DEPENDENCY_DIR_MISSING"></a>

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

**주의**  
테스트 패키지 내에서 `dependency-jars` 디렉터리를 찾을 수 없습니다. 테스트 패키지의 압축을 풀고 `dependency-jars` 디렉터리가 패키지 안에 있는지 확인한 다음 다시 시도하세요.

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

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

   ```
   $ unzip zip-with-dependencies.zip
   ```

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

   ```
   $ 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 테스트를 Device Farm과 통합](test-types-appium.md) 단원을 참조하세요.

## APPIUM\_JAVA\_TESTNG\_TEST\_PACKAGE\_JAR\_MISSING\_IN\_DEPENDENCY\_DIR
<a name="APPIUM_JAVA_TESTNG_TEST_PACKAGE_JAR_MISSING_IN_DEPENDENCY_DIR"></a>

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

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

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

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

   ```
   $ unzip zip-with-dependencies.zip
   ```

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

   ```
   $ 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 테스트를 Device Farm과 통합](test-types-appium.md) 단원을 참조하세요.

## APPIUM\_JAVA\_TESTNG\_TEST\_PACKAGE\_TESTS\_JAR\_FILE\_MISSING
<a name="APPIUM_JAVA_TESTNG_TEST_PACKAGE_TESTS_JAR_FILE_MISSING"></a>

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

**주의**  
테스트 패키지에서 \*-tests.jar 파일을 찾을 수 없습니다. 테스트 패키지의 압축을 풀고 패키지에 \*-tests.jar 파일이 하나 이상 있는지 확인한 다음 다시 시도하세요.

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

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

   ```
   $ unzip zip-with-dependencies.zip
   ```

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

   ```
   $ 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 테스트를 Device Farm과 통합](test-types-appium.md) 단원을 참조하세요.

## APPIUM\_JAVA\_TESTNG\_TEST\_PACKAGE\_CLASS\_FILE\_MISSING\_IN\_TESTS\_JAR
<a name="APPIUM_JAVA_TESTNG_TEST_PACKAGE_CLASS_FILE_MISSING_IN_TESTS_JAR"></a>

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

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

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

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

   ```
   $ unzip zip-with-dependencies.zip
   ```

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

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

1. jar 파일에서 파일을 추출하려면 다음 명령을 실행합니다.

   ```
   $ jar xf acme-android-appium-1.0-SNAPSHOT-tests.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
   ```

   자세한 내용은 [Device Farm에서 Appium 테스트 자동 실행Appium 테스트를 Device Farm과 통합](test-types-appium.md) 단원을 참조하세요.