Reputation: 70
When using Scenario Outline, the report generates two times of scenario, one without color and another with color (as show in the image).
This happens only when using Scenario Outline, not when using Scenario.
Here is my 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>
'
Here is My Cucumber Runner class
'
@RunWith(Cucumber.class) @CucumberOptions(format = {"html:cucumber-html-reports/first", "json:cucumber-html-reports/cucumber.json" }, features = { "test/features/FirstFeature.feature" }) public class CucumberCukesTest { } '
And i used monochrome,strict,dryrum, etc options, nothing will work. And also i used plugin instead of format.
Cucumber report for scenario using Scenario Outline keyword
Upvotes: 0
Views: 1779
Reputation: 9058
The first one is the generalized details of your scenario outline ie what you have written in the feature file. Check out the and in the 6th and 7th step.
The second one and others depending on the number of examples is the scenario with the details substituted with the actual values for userid and password. Notice the absence of <> in the same steps.
Upvotes: 0