Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration in Allure to Cucumber in Ruby

I need to configure the following params:

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.

like image 972
user8609295 Avatar asked Dec 14 '22 20:12

user8609295


1 Answers

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.

History features are handled out of the box by Allure CI plugins

Executor info

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:

Executor info

Allure CI plugins will add executor information for you

Categories

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 Categories

Retries

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.

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

Allure retries Allure retries

like image 127
Dmitry Baev Avatar answered Dec 29 '22 12:12

Dmitry Baev