'How to hide sensitive data like password and given Data table details used in examples in feature file cucumber framework in Extent report?

I need to hide sensitive data like password from extent report to share report to client which is configured with cucumber BDD framework selenium JAVA. Can anyone please help me is there any way the sensitive data like password and secret from Given data table displayed from extent report is hidden ?

Example:-

Feature: User Creation Scenario Outline: Admin user create new user Given user enter details | name | email | secret | | Aslak | [email protected] | Test123 | When admin user create new user with "" and "" Then user should be created

Examples: | username | password | | aman | Password@1 |

Need too hide the password and secret from the extent report while sharing to the team.



Solution 1:[1]

One possible way to achieve this is, you encode the password in your Given step and decode that in the implemented step or use the way your application stores and decodes the password. Something like this

Feature: User Creation Scenario Outline: Admin user create new user Given user enter details | name | email | secret | | Aslak | [email protected] | Test123 |

When admin user create new user with "" and "" Then user should be created

Examples: | username | password | | aman | 9cc3e5abdfaee198a|

Something like this and use a decoding algorithm in your stepdef. If your passwords or MD5 encrypted then pass the encrypted value itself

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jerome Josephraj