2017-09-18 6 views
2

AWSデバイスファームでテストスイートを実行しようとしています。プロジェクトで、デバイスファームで次のエラーが表示されます。[TestNG]すべてのクラスを実行しているjarファイルのtestng.xmlが見つかりませんでした。 MavenからAWSデバイスファームのzipを作成しているときに、次の警告が表示されます。 [警告] org.testng:testng:jar:5.14.3のPOMが無効で、推移的な依存関係が存在しない場合は有効詳細は、デバッグログを参照してください。 私はtestngの最新バージョンを持っており、確かなプラグインは何も役に立たないようです。これについての助けがあれば幸いです。次のように私のpom.xmlがある'[TestNG] AWS Device Farmでtestを実行しているときに、すべてのクラスのエラーを実行しているjarファイル内のtestng.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、私はデバイスのファームチームのために働く、ここでプルリクエストを追加しました。デバイスファームで、testng.xmlファイルが見つからないというエラーまたは警告が表示されますか。エラーではなく警告でなければなりません。お知らせ下さい。 – NikofTime

+0

こんにちはNikofTime、あなたは本当に警告であって、エラーではなく、実際のエラーは/ [エラー] RunTimeINIT:***終端:上記のclasspathに見つからないlibs:/ sikulixlibs/linux/libs64 '私は道を見つけることができませんでしたので、私のsikuliスクリプトを削除しました。これに関する助けは本当に感謝されます! –

答えて

0

あなたはtestng.xmlを作成した-tests.jarファイルのルートに追加する必要があります。これを行うには、src/test/resourcesディレクトリにスーパーPOM構成を利用するか、testResourcesタグを作成してtestng.xmlが現在参照されている参照。 助けてくれると助かります

ただ

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

関連する問題