allure-plugin icon indicating copy to clipboard operation
allure-plugin copied to clipboard

Allure plugin doesn't respect the categories.json in the allure-results folder

Open deepakguna opened this issue 4 years ago • 2 comments

Issue

Allure plugin doesn't respect the categories.json in the allure-results folder and it doesn't display the category verson

Context

  • Jenkins version: any supported version

  • Job type: Pipeline

  • Allure plugin version: 2.28.1

  • Allure commandline version: 2.8.1

Problem description

  • what were you doing I have placed the following categories.json in the allure-results folder and allure dashboard in local takes the input and displays the categories accordingly.
  • what was expected Jekins -Allure dashboard's category section should respect the categories.json placed in the allure results folder and display the category section accordingly.
  • what occurred finally Jekins -Allure dashboard's category section doesn't respect the categories.json placed in the allure results folder and hence it always displays the default - product and test defects in the category section .

categories.json: [ { "name": "Failed tests", "matchedStatuses": [ "broken", "failed" ] } ]

Allure dashboard In local takes account of categories.json: image

However Allure dashboard In Jenkins doesn't take account of categories.json: image

Logs & Traces

Please include any relevant log that could serve to better understand the source of your issue

deepakguna avatar May 09 '20 07:05 deepakguna

It is indeed an issue that I also faced. It would be nice to be able to have our categories in the jenkins report.

niduvivier avatar Jul 17 '20 08:07 niduvivier

I think I had a similar issue.

Context: I am running around 200 e2e browser tests by using Java (gradle) + Selenide + Cucumber, then putting cucumber.json file in allure-results folder and then publishing the allure-results folder on Jenkins with Allure plugin. Around half of the scenarios completely ignore the categories.json file and fall under "Product defects" or "Test defects" instead.

Investigation: By poking around I noticed that the allure-results/history/history.json was the file messing with categories in my case.

Solution: Remove allure-results/history/history.json before passing the folder to the Jenkins allure plugin. I still have history of scenario in the report, I'm guessing it's managed from the Jenkins plugin side, so the history.json file does not matter.

Note: I do not know the exact purpose of history folder or its contents, so I suggest making backups before experimenting. Please let others know if this solved the issue on your side.

EdgarsAvotins avatar Dec 21 '20 15:12 EdgarsAvotins