2016-11-16 54 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