项目作者: sitture

项目描述 :
A custom cucumber-jvm formatter using ExtentReports.
高级语言: Java
项目地址: git://github.com/sitture/cucumber-jvm-extentreport.git
创建时间: 2016-08-27T19:46:30Z
项目社区:https://github.com/sitture/cucumber-jvm-extentreport

开源协议:MIT License

下载


cucumber-jvm-extentreport

Build Status Maven Central license

A custom cucumber-jvm report formatter using ExtentReports

The current version is only compatible with latest cucumber 2.0.1+.

Note: Use version 2.0.1 with cucumber 1.2.5.

Preconditions

  • Maven / Java 8

Usage

Add the following to your list of dependencies in pom.xml

  1. <dependency>
  2. <groupId>com.sitture</groupId>
  3. <artifactId>cucumber-jvm-extentreport</artifactId>
  4. <version>3.1.0</version>
  5. </dependency>

Add the following if you’re using gradle to your build.gradle file.

  1. compile 'com.sitture:cucumber-jvm-extentreport:3.1.0'

Setup - Cucumber Runner

Add the following to your cucumber runner class:

  1. @RunWith(Cucumber.class)
  2. @CucumberOptions(
  3. features = {"src/test/resources"},
  4. plugin = {"com.sitture.ExtentFormatter:output/extent-report/index.html", "html:output/html-report"})
  5. public class RunCukesTest {
  6. @AfterClass
  7. public static void setup() {
  8. // Loads the extent config xml to customize on the report.
  9. ExtentReporter.setConfig("src/test/resources/config.xml");
  10. // adding system information
  11. ExtentReporter.setSystemInfo("Browser", "Chrome");
  12. ExtentReporter.setSystemInfo("Selenium", "v2.53.1");
  13. }
  14. }

Reports Location

The ExtentFormatter takes the location of reports directory as the parameter.
E.g. com.sitture.ExtentFormatter:output/extent-report/index.html will generate the report at output/extent-report/index.html.

Configuration file

Refer here to create the config xml file: ExtentReports Configuration
To load the config file:

  1. ExtentReporter.setConfig(new File("your config xml file path"));

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request