2016-11-16 130 views
0

当使用场景概要时,报告会生成两个情景,一个没有颜色,另一个没有颜色(如图所示)。黄瓜报告使用场景时的重复情况概要

使用方案大纲时,使用方案没有发生这种情况时只。

这是我的pom.xml ' http://maven.apache.org/xsd/maven-4.0.0.xsd“> 4.0.0 GroupMaven ArtifactMaven 0.0.1-SNAPSHOT POM ProjectMaven http://maven.apache.org

<properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
</properties> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>2.19.1</version> 
      <executions> 
       <execution> 
        <configuration> 
         <includes> 
          <include>**/*Test.java</include> 
         </includes> 
        </configuration> 
        <goals> 
         <goal>test</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 
    </plugins> 
</build> 

<dependencies> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <version>4.11</version> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>info.cukes</groupId> 
     <artifactId>cucumber-java</artifactId> 
     <version>1.2.4</version> 
    </dependency> 
    <dependency> 
     <groupId>info.cukes</groupId> 
     <artifactId>cucumber-junit</artifactId> 
     <version>1.2.4</version> 
    </dependency> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>2.53.1</version> 
    </dependency> 
    <dependency> 
     <groupId>com.opencsv</groupId> 
     <artifactId>opencsv</artifactId> 
     <version>3.8</version> 
    </dependency> 
</dependencies> 

'

这是我的黄瓜亚军类

'

@RunWith(Cucumber.class) @CucumberOptions(格式= { “HTML:黄瓜-HTML的报告/第一”, “JSON:黄瓜 - HTML的报告/ cucumber.json”},特征= { “测试/特征/ FirstFeature.feature”}) 公共类CucumberCukesTest { } '

,我用单色,严格,dryrum等选项,没有什么会工作。我也用插件而不是格式

Cucumber report for scenario using Scenario Outline keyword

+0

尝试使用[qaf小黄瓜客户端](https://qmetry.github.io/qaf/latest/gherkin_client.html)它会生成非常[描述性报告](https://qmetry.github.io/qaf/latest /qaf_reporting.html)。 – user861594

回答

0

第一个是您的方案大纲的广义细节,即你已经写在功能文件的内容。在第六步和第七步中查看。

第二个和其他取决于示例数量的方案是使用用户标识和密码的实际值替换的详细信息。在相同的步骤中注意不存在<>。

+0

好吧,但我不想在输出黄瓜报告中的第一个,只有我想在报告中的第二个(有色)。我如何配置它? –

+0

我不知道是否有任何选项来配置它。看看如何修改源代码以满足您的需求。或者你可以看看使用报告工具。 – Grasshopper