allure-plugin
allure-plugin copied to clipboard
Allure plugin doesn't respect the categories.json in the allure-results folder
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:
However Allure dashboard In Jenkins doesn't take account of categories.json:
Logs & Traces
Please include any relevant log that could serve to better understand the source of your issue
It is indeed an issue that I also faced. It would be nice to be able to have our categories in the jenkins report.
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.