allure-framework / allure-framework/allure-java

Add property to support the restriction for the Steps length in the report

オープン
#490 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
376
フォーク
240
平均マージ
1日 7時間
マージ済み PR(30日)
45

説明

#### I'm submitting a ...
- [x] feature request

Add a property to support the restriction for the Steps length in the report, for example,
`allure.max.title.length' as was in Allure 1.

#### What is the current behavior?
Property `allure.max.title.length` is ignored.

#### What is the expected behavior?
When `allure.max.title.length=1000` is added in `allure.property` file, the logged steps in the Allure report should be cut after 1000 symbols.

#### What is the motivation / use case for changing the behavior?
Sometimes, very big values are passed to methods annotated with @Step annotation, and there is no obvious way to restrict the number of characters to be printed in the report.
For example, if 'allure-assertj' is used, and the JSON objects to be compared are large, there is no way to restrict how they are displayed in the report.
On the following sample screenshot there are more than 2000 characters:
![image](https://user-images.githubusercontent.com/13782827/98965363-a272be80-2512-11eb-9b9f-e2a0bf8c691e.png)
and this is just about 1/3 of the whole JSON object. And all its characters are displayed in the step.

#### Additional information
The issue was discussed here https://github.com/allure-framework/allure2/issues/1150

| Allure version | 2.13.5 |
| --- | --- |
| Test framework | testng@6.9.10 |
| Allure integration | allure-testng@2.13.5 |
| Generate report using | allure-maven@2.9 |

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、レポートのステップが生成される際に、プロパティ allure.max.title.length と @Step の値がどのように処理されるかを確認します。要求された制限を実装し、記録されるステップテキストが設定された文字数で切り詰められるようにしたうえで、1000 のような値によって生成されるレポート出力が変わることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
testing-qa
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。