allure-framework / allure-framework/allure-java

TestNG retries are marked as Skipped and the test itself is not marked as Flaky Test

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

説明

[//]: # (
. Note: for support questions, please use Stackoverflow or Gitter**.
. This repository's issues are reserved for feature requests and bug reports.
.
. In case of any problems with Allure Jenkins plugin** please use the following repository
. to create an issue: https://github.com/jenkinsci/allure-plugin/issues
.
. Make sure you have a clear name for your issue. The name should start with a capital
. letter and no dot is required in the end of the sentence. An example of good issue names:
.
. - The report is broken in IE11
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

#### I'm submitting a ...
- [X] bug report
- [ ] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.

#### What is the current behavior?
Tests that failed and then success after re-run using TestNG retryAnalyzer marked as skipped and not showing the Flaky Test (bomb) icon.
![image](https://user-images.githubusercontent.com/29943195/84980868-669f1d00-b15d-11ea-83ed-065a5766d9dc.png)
![image](https://user-images.githubusercontent.com/29943195/84980908-80d8fb00-b15d-11ea-88e9-962d5f49bb3d.png)

#### If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
The retry impl class

public class RetryAnalyzerImpl implements IRetryAnalyzer {
private int maxRetryCount = 3;
private int retryCount = 0;

public boolean retry(ITestResult result) {
if (retryCount < maxRetryCount) {
retryCount++;
return true;
}
return false;
}
}

The test method

@Test(retryAnalyzer= RetryAnalyzerImpl.class)
public void VerifyRetrievePublicaAndActiveCommunity(){
int i = ThreadLocalRandom.current().nextInt(0, 2);
System.out.println(i);
Assert.assertEquals(i,0);
}

#### What is the expected behavior?
The retries are marked as Failed correctly. And the tests are marked as Flaky.

#### What is the motivation / use case for changing the behavior?

#### Please tell us about your environment:

| Allure version | 2.13.3 |
| Test framework | testng@7.1.0 |
| Allure integration | allure-testng@2.13.3 |
| Generate report using | allure windows cli@2.13.3 |

#### Other information

[//]: # (
. e.g. detailed explanation, stacktraces, related issues, suggestions
. how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc
)

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

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

調査の方向性

まず、提供された RetryAnalyzerImpl と TestNG テストを allure-testng 2.13.3 で使用して動作を再現し、次に TestNG 統合とレポート出力でリトライがどのように分類されるかを追跡します。失敗したリトライがスキップとして報告されず、テストに Flaky Test インジケーターが表示されれば完了です。

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

評価

技術スタック
java
領域
testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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