allure-framework / allure-framework/allure-python
How to create a custom Allure step function for sensible data
- 主要言語
- Python
- スター
- 814
- フォーク
- 260
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
#### I'm submitting a ...
- [ ] bug report
- [x] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.
#### What is the current behavior?
With a step decorator like this:

Which takes an element (a text box) and enters the value in it. In the step function I display the value that I want to enter No matter what I enter on the step title, the report always shows the info that was passed as arguments to the function.
My report looks like the following image:

#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Not a bug
#### What is the expected behavior?
Thus, the "value" argument will always be displayed and that is something that I cannot have on certain projects. I could either use with not showing the value at all or to change it to something like '*****'. Is there anyway to make a custom step function that solves my problem?.
#### What is the motivation / use case for changing the behavior?
I am currently working on a Testing Automation team, using Python and Allure to make reports of all the test cases that we run. Sometimes we deal with sensible data (e.g: passwords) that I can't show directly on the reports due to data protection policies.
#### Please tell us about your environment:
- Allure version: 2.13.0
- Test framework: pytest@3.6.1
- Allure adaptor: pytest-allure-adaptor@1.7.10
#### Other information
[//]: # (
. e.g. detailed explanation, stacktraces, related issues, suggestions
. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc
)
コントリビューションガイド
調査の方向性
まず、step デコレーターと、その引数から Allure レポートのタイトルに至るまでの経路を確認します。issue に記載されている pytest アダプターの動作を確認し、カスタム step でパスワードなどの機密性の高い値を省略またはマスクする方法を判断します。カスタム step が、機密性の高い引数を公開せずに有用なレポートを生成できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- testing
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100