allure-framework / allure-framework/allure-python

How to create a custom Allure step function for sensible data

未关闭
#481 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
task:new feature theme:core
主要语言
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:
![imagen](https://user-images.githubusercontent.com/26765591/77885990-59624880-7268-11ea-9bd6-96906efd1518.png)

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:
![imagen](https://user-images.githubusercontent.com/26765591/77886155-a34b2e80-7268-11ea-9c12-bef4e7382fdf.png)

#### 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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。