2017-06-09 11 views
-1

CentOSマシン上で私のSelenium Mavenベースのプロジェクトを実行しています。このコマンドを使用しています "mvnクリーンテスト "を実行してスクリプトを実行します。pom.xmlをcronジョブで実行しているときにこのエラーが発生する "org.apache.maven.surefire.booter.SurefireExecutionException:プロバイダ内の例外"

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire- plugin:2.20:test (default-test) on project BaTAutomation: There are test failures.  
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump,  
[ERROR] Exception in provider 
[ERROR] org.apache.maven.surefire.booter.SurefireExecutionException: Exception in provider 
[ERROR] at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:88) 
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1060) 

なぜこのエラーが発生しているのか教えてください。私のpom.xmlファイル内

私のpom.xmlファイルが

 <project xmlns="http://maven.apache.org/POM/4.0.0"      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.indusface.testtas</groupId> 
    <artifactId>BaTAutomation</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <url>http://maven.apache.org</url> 
    <properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    </properties> 

    <dependencies> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>3.4.0</version> 
    </dependency> 
    <dependency> 
    <groupId>org.testng</groupId> 
    <artifactId>testng</artifactId> 
    <version>6.11</version> 
    </dependency> 
    <dependency> 
    <groupId>log4j</groupId> 
    <artifactId>log4j</artifactId> 
    <version>1.2.17</version> 
    </dependency> 
    <dependency> 
    <groupId>com.amazonaws</groupId> 
    <artifactId>aws-java-sdk</artifactId> 
    <version>1.11.98</version> 
</dependency> 
    <dependency> 
    <groupId>commons-configuration</groupId> 
    <artifactId>commons-configuration</artifactId> 
    <version>1.10</version> 
    </dependency> 
    <dependency> 
    <groupId>com.relevantcodes</groupId> 
    <artifactId>extentreports</artifactId> 
    <version>2.41.2</version> 
    </dependency> 
    <dependency> 
    <groupId>javax.activation</groupId> 
    <artifactId>activation</artifactId> 
    <version>1.1</version> 
</dependency> 
<dependency> 
    <groupId>javax.mail</groupId> 
    <artifactId>mail</artifactId> 
    <version>1.4</version> 
</dependency> 
    </dependencies> 
    <build> 
     <plugins> 
      <!-- Following plugin executes the testng tests --> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-surefire-plugin</artifactId> 
       <version>2.20</version> 
       <configuration> 
        <forkMode>never</forkMode> 
        <!-- Suite testng xml file to consider for test execution --> 
        <suiteXmlFiles> 
          <suiteXmlFile>TestNG.xml</suiteXmlFile> 
        </suiteXmlFiles> 
       </configuration> 
      </plugin> 
      <plugin> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.6.1</version> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    </project> 

で親切に何か問題があると教えて

+0

セレンプロジェクトをリポジトリからダウンロードしてシェルスクリプトを実行するシェルスクリプトを作成しました。うまくいきます。しかし、私が棚を動かそうとしたときlスクリプトをcronjobで実行すると動作しません。リポジトリからプロジェクトをダウンロードできますが、セレンスクリプトを実行することはできません。 –

答えて

0

は私の問題は、resolved.Iはなぜ私のCentOSのマシンの私のCentOSマシンを再起動したですDISPLAYが変更されました。上記の問題が発生しました。更新されたDISPLAYに変更された後、正常に動作します。

関連する問題