6

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.

Krishna Vedula
  • 1,643
  • 1
  • 27
  • 31
user8609295
  • 73
  • 1
  • 6
  • 2
    I found an answer: Simply generate the report using one of Allure CI plugins (Jenkins/Teamcity/Bamboo) to enrich your report with history and executor info. To add an environments to your report create an environment.properties file: some.property.name=some-value and place such file to your allure-results folder (the folder that contains allure xml files) – user8609295 Sep 14 '17 at 14:43

1 Answers1

14

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

Dmitry Baev
  • 2,270
  • 1
  • 14
  • 24
  • Thanks! it's a lot of information! Do you known how change the title and subtitle in the report?, because it show me: Title: Allure Report unknown Subtitle: unknown - unknown (Unknown) – user8609295 Sep 15 '17 at 12:11