Undone tests fail silently when using the JUnit reporter
- 主要言語
- JavaScript
- スター
- 1.9k
- フォーク
- 359
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When running unit tests at the command line, using the default reporter, I get the following error in the console if there are undone tests:
_FAILURES: Undone tests (or their setups/teardowns):
details of my test here
To fix this, make sure all tests call test.done()_
However, when using the JUnit reporter, the failure is completely silent - no XML files are written. In our case, this means that our CI system (Jenkins) doesn't see the failures (or indeed any results) and hence marks the build as a success.
I would expect the results to still be written in this case, so that we can see which tests have passed and which have failed.
Note that the cause of undone tests isn't always due to the developer failing to call test.done() - in this specific case, the test.done() was in a callback within the unit test that ended up not getting called due to regression introduced in the production code being tested.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、JUnit reporter が未完了のテストをどのように処理するかを追跡し、それをデフォルト reporter の失敗パスと比較します。未完了のテストで問題を再現し、その後、reporter が何も出力せずに終わるのではなく、関連する成功および失敗の結果を含む XML を書き込むことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100