Ruby中对黄瓜的吸引力配置 [英] Configuration in Allure to Cucumber in Ruby

查看:123
本文介绍了Ruby中对黄瓜的吸引力配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要配置以下参数:

environment, trend, history, executors, retries, 

等。我需要这些参数来使黄瓜与红宝石一起工作。我在很多地方搜索过,但没有找到太多。如果可以提供这些参数,我将不胜感激。

etc. I need these params for cucumber to work with ruby. I searched in a lot of places and I did not find much. I would appreciate if you can provide these params.

推荐答案

历史记录



Allure在报告生成期间将历史记录信息存储到 allure-report / history 文件夹中。因此,在生成报告之前,您需要将以前启动时的文件夹复制到诱惑结果中。

History

Allure stores history information to allure-report/history folder during report generation. So you need to copy such folder from previous launch into your allure-results before you generate the report.

历史功能由Allure CI插件即时处理

要添加有关测试执行程序的信息,请在 executor.json >魅力结果:

To add an information about your test executor create a file executor.json in your allure-results:

{
  "name": "Jenkins",
  "type": "jenkins",
  "url": "http://example.org",
  "buildOrder": 13,
  "buildName": "allure-report_deploy#13", 
  "buildUrl": "http://example.org/build#13",
  "reportUrl": "http://example.org/build#13/AllureReport",
  "reportName": "Demo allure report"
}

报告此类信息将像这样显示:

In the report such information will be displayed like this:

Allure CI插件将为您添加执行人信息

您也可以在报告中添加自定义问题类别。创建文件 categories.json 并将其放入结果文件夹:

You can also add custom problem categories in the report. Create file categories.json and place it into your results folder:

[
  {
    "name": "Ignored tests",
    "messageRegex": ".*ignored.*",
    "matchedStatuses": [
      "skipped"
    ]
  },
  {
    "name": "Infrastructure problems",
    "messageRegex": ".*RuntimeException.*",
    "matchedStatuses": [
      "broken"
    ]
  },
  {
    "name": "Outdated tests",
    "messageRegex": ".*FileNotFound.*",
    "matchedStatuses": [
      "broken"
    ]
  },
  {
    "name": "Regression",
    "messageRegex": ".*\\sException:.*",
    "matchedStatuses": [
      "broken"
    ]
  }
]

已处理重试 默认情况下。对于每个测试,Allure都会生成 historyId (通常是md5(fullName + parameterValues))。如果报告包含的结果很少,且具有相同的 historyId 魅力仅显示最新,则其他标记为重试,并且可以从重试部分获得

Retries are handled by default. For each test Allure generates historyId (usually it is md5(fullName + parameterValues)). If report contains few results with the same historyId Allure only displays latest, other are marked as retries and available from Retries section on test result page.

例如,如果您运行测试3次(前2次中断,通过了最新的测试,Allure将显示通过的测试)

For example, if you run your test 3 times (first 2 are broken, latest is passed, Allure will display such test as passed)


这篇关于Ruby中对黄瓜的吸引力配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆