2016-06-16 17 views
0

私はJBehave + Selenium + Serenity + Mavenを使用しています。 JBehaveが正常に動作し、結果が得られたにもかかわらず、Serenityレポートは空になります。セロニティレポートが空です

Generating reports view to 'C:\Users\neos\workspace\project\target\jbehave' using formats '[stats, console, txt, html, stats, junitscenarioreporter]' and view properties '{navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, reports=ftl/jbehave-reports.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl, decorated=ftl/jbehave-report-decorated.ftl, maps=ftl/jbehave-maps.ftl}' 
Reports view generated with 3 stories (of which 0 pending) containing 2 scenarios (of which 0 pending) 
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.415 sec 

Results : 

Tests run: 14, Failures: 0, Errors: 0, Skipped: 0 

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ CHESAR3 --- 
[INFO] Building jar: C:\Users\neos\workspace\project\target\CHESAR3-0.0.1-SNAPSHOT.jar 
[INFO] 
[INFO] --- serenity-maven-plugin:1.1.21:aggregate (serenity-reports) @ CHESAR3 --- 
Merging requirements = [] 
Merging requirements = [] 
Merged requirements set = [] 
[INFO] REPORTS GENERATED IN C:\Users\neos\workspace\project\target\site\serenity 
[INFO] REPORT HOME PAGE: C:\Users\neos\workspace\project\target\site\serenity\index.html 
[INFO] Generating release reports for: [] 
GENERATE CUSTOM REPORTS 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 15.971 s 
[INFO] Finished at: 2016-06-16T17:05:07+03:00 
[INFO] Final Memory: 23M/295M 
[INFO] ------------------------------------- 

私が行っていることに留意してください: パブリッククラスRUNTESTはSerenityStories {

を拡張して、私のpom.xmlの下に見つけてください:

<build> 

    <plugins> 
     <plugin> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.3</version> 
      <configuration> 
       <source>1.8</source> 
       <target>1.8</target> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-failsafe-plugin</artifactId> 
      <version>2.19.1</version> 
      <configuration> 
       <includes> 
        <include>RunTest.java</include> 
       </includes> 
      </configuration> 
     </plugin> 

     <plugin> 
      <groupId>net.serenity-bdd.maven.plugins</groupId> 
      <artifactId>serenity-maven-plugin</artifactId> 
      <version>${serenity.maven.version}</version> 
      <dependencies> 
       <dependency> 
        <groupId>net.serenity-bdd</groupId> 
        <artifactId>serenity-core</artifactId> 
        <version>${serenity.version}</version> 
       </dependency> 
      </dependencies> 
      <executions> 
       <execution> 
        <id>serenity-reports</id> 
        <phase>post-integration-test</phase> 
        <goals> 
         <goal>aggregate</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 
<dependencies> 
    <dependency> 
     <groupId>net.serenity-bdd</groupId> 
     <artifactId>serenity-junit</artifactId> 
     <version>${serenity.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.12</version> 
    </dependency> 
    <dependency> 
     <groupId>net.serenity-bdd</groupId> 
     <artifactId>serenity-jbehave</artifactId> 
     <version>${serenity.jbehave.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-api</artifactId> 
     <version>1.7.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.slf4j</groupId> 
     <artifactId>slf4j-log4j12</artifactId> 
     <version>1.7.5</version> 
    </dependency> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>2.53.0</version> 
    </dependency> 
</dependencies> 

ストーリーが記録されていますレポートに0の結果が含まれています VIEW REPORT

答えて

0

EDIT変更したのpom.xmlは、ちょうど下に追加した後mvn clean verifyのコマンドを実行します。

<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>CHESAR3</groupId> 
    <artifactId>CHESAR3</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <properties> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <serenity.version>1.1.21</serenity.version> 
     <serenity.maven.version>1.1.21</serenity.maven.version> 
     <webdriver.driver>firefox</webdriver.driver> 
     <serenity.jbehave.version>1.13.0</serenity.jbehave.version> 
    </properties> 

    <build> 

     <plugins> 
      <plugin> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <version>3.3</version> 
       <configuration> 
        <source>1.8</source> 
        <target>1.8</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-failsafe-plugin</artifactId> 
       <version>2.19.1</version> 
       <configuration> 
        <includes> 
         <includesFile>**/*RunTest.java</includesFile> 
        </includes> 
       </configuration> 
      </plugin> 

      <plugin> 
       <groupId>net.serenity-bdd.maven.plugins</groupId> 
       <artifactId>serenity-maven-plugin</artifactId> 
       <version>1.1.36</version> 
       <executions> 
        <execution> 
         <id>serenity-reports</id> 
         <phase>post-integration-test</phase> 
         <goals> 
          <goal>aggregate</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-surefire-plugin</artifactId> 
       <version>2.19.1</version> 
       <configuration> 
        <skipTests>true</skipTests> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
    <dependencies> 
     <dependency> 
      <groupId>net.serenity-bdd</groupId> 
      <artifactId>serenity-junit</artifactId> 
      <version>${serenity.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>4.12</version> 
     </dependency> 
     <dependency> 
      <groupId>net.serenity-bdd</groupId> 
      <artifactId>serenity-jbehave</artifactId> 
      <version>${serenity.jbehave.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-api</artifactId> 
      <version>1.7.5</version> 
     </dependency> 
     <dependency> 
      <groupId>org.slf4j</groupId> 
      <artifactId>slf4j-log4j12</artifactId> 
      <version>1.7.5</version> 
     </dependency> 
     <dependency> 
      <groupId>org.seleniumhq.selenium</groupId> 
      <artifactId>selenium-java</artifactId> 
      <version>2.53.0</version> 
     </dependency> 
    </dependencies> 
</project> 
+0

私はこのプラグインを持っています。私は何が間違っているのか分からない。私は問題の説明にpom.xmlを追加するつもりです – Petros

+0

サンプルプロジェクトを投稿してgithubにurの問題を再現させてみることができます。 –

+0

pom.xmlはokですか?セレニティにJbehaveの物語を見るために何か他のことをしなくてはなりませんか? – Petros