Search code examples
cucumberjunit4aspectjcucumber-javaallure

Allure Report: How to hide sensitive data in allure report?


There is a need to hide sensitive data from allure reports. From what I understand there could be some kind of interceptor that at the moment when allure report is created will replace data with *** or some message 'hidden data' or so.

That's why I thought about aspectJ, as I understand it can help with such kind of tasks. And here is where I stopped: https://github.com/anagornaia/allure-cucumber-aspectj

With this result:

enter image description here

Parameters are not hidden, in step name, there is 'sensitive data', but a sub-step was created... that has 'sensitive data' replaced with 'hidden data'.

The question:

  1. Is there a possibility to hide data without creating some strange sub-step... and hide values from the parameters section?
  2. If yes, what I do wrong? Where I should look? Are there any examples of removing sensitive data from allure report that I missed?

Solution

  • I found a solution by creating plugin on AllureCucumber5Jvm bases. I changed lines where parameters where set and replaced in step names variables, also introduced a Boolean variable that gets value from configuration where it says to hide or not to hide information from report. Soon will update project in GitHub for other interested people.