Rerun formatter: the message based version miss failures in around hooks

オープン
#1,869 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
ruby
領域
testing, tooling

調査の方向性

まず、メッセージベースの rerun formatter とイベントベースのバージョンを比較し、Around hook の失敗と、issue に記載されている TestCaseFinished および TestStepFinished メッセージに注目してください。Around hook の失敗が検出され、rerun の出力に空ではなく division.feature:6 が含まれれば完了です。

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

説明

:bug: bug
👓 What did you see?

For Around hook there are no TestStepStarted or TestStepFinished events fired. If an Around hook fails it is only detected from the result in the TestCaseFinished event. The result of the TestCaseFinished event are frequently used by formatters in Cucumber-Ruby, so the event based formatters do detect and report failures in Around hook.
In case of messages there is only result data in the TestStepFinished message and not in the TestCaseFinished message. Therefore, when the rerun formatter was changes to use messages instead of event, it no longer detect failures in Around hooks.

Using the message based version of the rerun formatter, a failure in an Around hook could look like:
Summary output:

1 scenario (1 failed)
4 steps (4 passed)

Content for rerun file is empty

✅ What did you expect to see?

Using the event based version of the rerun formatter, a failure in an Around hook could look like:
Summary output:

1 scenario (1 failed)
4 steps (4 passed)

Content for rerun file:
division.feature:6

📦 Which tool/library version are you using?

No response

🔬 How could we reproduce it?

No response

📚 Any additional context?

No response

主要言語
Ruby
スター
5.2k
フォーク
1.1k
平均マージ
2日 14時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cucumber/cucumber-ruby のほかの issue

cucumber/cucumber-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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