2017-09-18 20 views
2

AWS 장치 팜에서 테스트 제품군을 실행하려고하면 Maven입니다. 프로젝트에서 장치 팜 구문 분석 결과 문서에 다음 오류가 표시됩니다. [TestNG] 모든 클래스를 실행하는 jar 파일에서 testng.xml을 찾을 수 없습니다. Maven에서 AWS 장치 팜의 압축을 만들 때 다음 경고가 표시됩니다. [경고] org.testng : testng : jar : 5.14.3의 POM이 유효하지 않으며 전이 의존성 (있는 경우)을 사용할 수 없으면 자세한 내용은 디버깅 로깅을 참조하십시오. 나는 testng과 surefire 플러그인의 최신 버전을 가지고있어 도움이되지 않는다. 이 중 하나에 대한 도움을 많이 주시면 감사하겠습니다. 다음과 같이'[TestNG] AWS Device Farm에서 테스트를 실행하는 동안 모든 클래스의 오류를 실행하는 jar 파일에서 testng.xml을 찾을 수 없습니다.

내 pom.xml 파일은 다음과 같습니다 http://maven.apache.org/xsd/maven-4.0.0.xsd "> 4.0.0

<groupId>com.pankanis.cameraplus </groupId> 
<artifactId>CameraPlusApp</artifactId> 
<version>0.0.1-SNAPSHOT</version> 
<packaging>jar</packaging> 

<name>CameraPlusApp</name> 
<url>http://maven.apache.org</url> 

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <suiteXmlFile>./testng.xml</suiteXmlFile> 
</properties> 

<dependencies> 

    <!-- https://mvnrepository.com/artifact/io.appium/java-client --> 
    <dependency> 
     <groupId>io.appium</groupId> 
     <artifactId>java-client</artifactId> 
     <version>4.1.2</version> 
    </dependency> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>2.53.1</version> 
    </dependency> 
    <dependency> 

     <groupId>com.github.genium-framework</groupId> 

     <artifactId>Appium-Support</artifactId> 

     <version>1.0.5</version> 

    </dependency> 
    <dependency> 
     <groupId>io.github.bonigarcia</groupId> 
     <artifactId>webdrivermanager</artifactId> 
     <version>1.4.9</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-log4j12</artifactId> 
     <version>1.7.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.testng</groupId> 
     <artifactId>testng</artifactId> 
     <version>6.11</version> 
    </dependency> 
    <dependency> 
     <groupId>com.sikulix</groupId> 
     <artifactId>sikulixapi</artifactId> 
     <version>1.1.0</version> 
    </dependency> 
    <dependency> 
     <groupId>xml-apis</groupId> 
     <artifactId>xml-apis</artifactId> 
     <version>1.4.01</version> 
    </dependency> 
    <dependency> 
     <groupId>com.relevantcodes</groupId> 
     <artifactId>extentreports</artifactId> 
     <version>2.41.1</version> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.12</version> 
    </dependency> 
    <dependency> 
     <groupId>org.apache.poi</groupId> 
     <artifactId>poi-ooxml</artifactId> 
     <version>3.9</version> 
    </dependency> 
    <dependency> 
     <groupId>log4j</groupId> 
     <artifactId>log4j</artifactId> 
     <version>1.2.17</version> 
    </dependency> 
    <dependency> 
     <groupId>org.uncommons</groupId> 
     <artifactId>reportng</artifactId> 
     <version>1.1.4</version> 
     <scope>test</scope> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.6.1</version> 
      <configuration> 
       <source>${jdk.version}</source> 
       <target>${jdk.version}</target> 
      </configuration> 

     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>2.20.1</version> 
      <configuration> 

       <suiteXmlFiles> 
        <suiteXmlFile>${suiteXmlFile}</suiteXmlFile> 
       </suiteXmlFiles> 


      </configuration> 

     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-jar-plugin</artifactId> 
      <version>2.6</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>test-jar</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-dependency-plugin</artifactId> 
      <version>2.10</version> 
      <executions> 
       <execution> 
        <id>copy-dependencies</id> 
        <phase>package</phase> 
        <goals> 
         <goal>copy-dependencies</goal> 
        </goals> 
        <configuration> 
         <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <version>2.5.4</version> 
      <executions> 
       <execution> 
        <phase>package</phase> 
        <goals> 
         <goal>single</goal> 
        </goals> 
        <configuration> 
         <finalName>zip-with-dependencies</finalName> 
         <appendAssemblyId>false</appendAssemblyId> 
         <descriptors> 
          <descriptor>src/main/assembly/zip.xml</descriptor> 
         </descriptors> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 

</build> 

+0

안녕 Ronit, 나는 장치 농장 팀을 위해 일을 여기에 끌어 오기 요청을했다. Device Farm에서 testng.xml 파일을 찾을 수 없다는 오류 또는 경고가 표시됩니까? 오류가 아니라 경고 여야합니다. 알려줘. – NikofTime

+0

안녕 NikofTime, 당신은 바로 경고와 오류가 아니라 실제 오류가/'[오류] RunTimeINIT : *** 종료 : 위의 클래스 경로에 찾을 수없는 수출 libs :/sikulixlibs/linux/libs64', 나는 나가 sikuli 원본을 이렇게 제거 된 방법을 찾아 낼 수 없었다. 이것에 대한 도움은 정말 감사하겠습니다! –

답변

0

당신 testng.xml 파일을 만든 testest.xml 파일의 루트에 testng.xml 파일을 추가해야합니다. 이렇게하려면 src/test/resources 디렉토리에 저장하여 superpom 구성을 활용하거나 testResources 태그를 testng.xml이 현재 참조되어있는 참조 도움이 되길 바랍니다

,

그냥

https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/pull/14