• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

SpacialCircumstances/gradle-cucumber-reporting: A gradle plugin to generate pret ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

SpacialCircumstances/gradle-cucumber-reporting

开源软件地址(OpenSource Url):

https://github.com/SpacialCircumstances/gradle-cucumber-reporting

开源编程语言(OpenSource Language):

Groovy 100.0%

开源软件介绍(OpenSource Introduction):

Gradle Cucumber Reporting

Generate pretty HTML files from cucumber report json files. Uses https://github.com/damianszczepanik/cucumber-reporting for generating the reports.

This plugin on the Gradle Plugin Portal

Usage

The plugin will automatically run at the end of your test task. You can also run it manually with the generateCucumberReports task.

Adding the plugin to your build.gradle

plugins {
  id "com.github.spacialcircumstances.gradle-cucumber-reporting" version "0.1.24"
}

Configuration

Somewhere in your build.gradle add the following snippet:

cucumberReports {
  outputDir = file('path/for/generated/html')
  buildId = '0'
  reports = files('path/to/cucumber-report.json', 'another/cucumber-json.json')
}

Optional configuration

  • classifications: A map with <String, String> pairs that are added to the HTML report, for example os name etc. Use the method classification to add a single classification. Setting this property directly will overwrite old classifications.
  • testTasksFinalizedByReport: true or false determines if the generateCucumberReports task finalizes the test tasks. true by default. Should be set to false if you have other tests that do not create cucumber reports and you want to avoid the failing task.
  • excludeTags: A List<String> of regexes that will filter out tags so they are not present in the generated report.
  • runWithJenkins: Set this to true if you are running on a Jenkins. false by default.
  • expandAllSteps: Set this to true to make all scenarios expanded in the generated report.
  • projectNameOverride: A String. By default, the reports will use the name of your gradle project as the project name. If this property is not null, it will be used instead.
  • trends: File containing a trend store.
  • trendsLimit: Limit the number of past trends used in report generation.
  • notFailingStatuses: (Set<String>) Step statuses that should not be marked as failed in the report generation
  • directorySuffix: String. Sets a suffix for directories.
  • reducingMethod: String, one of: MERGE_FEATURES_BY_ID, MERGE_FEATURES_WITH_RETEST, SKIP_EMPTY_JSON_FILES, HIDE_EMPTY_HOOKS. Adds a reducing method.
Example

A working example (with pre-existing reports) can be found in the example directory.

cucumberReports {
  //...
  //Pass a map
  classifications = [Browser: "Firefox"]
  //or call the classification method
  classification "Browser" "Firefox"
  
  //Pass a list to exclude
  excludeTags = [".*"]
  //or call the excludeTag method
  excludeTag ".*"
}

Properties

  • skipReports: Pass this via -PskipReports when invoking gradle.

License

Just as https://github.com/damianszczepanik/cucumber-reporting, this plugin is available under the terms of the LGPL 2.1 license.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap