2

私のキュウリテストはコマンドラインでうまく機能しますが、Jenkins / Hudson継続的インテグレーションで実行すると、次のようになりますが、修正方法がわかりません。

11 scenarios (3 skipped, 3 pending, 5 passed)
78 steps (51 skipped, 3 pending, 24 passed)
0m3.238s
Build step 'Execute shell' marked build as failure
Recording test results
Failed to send e-mail to kamilski81 because no e-mail address is known, and no default e-mail domain is configured
Failed to send e-mail to i.wooten because no e-mail address is known, and no default e-mail domain is configured
Failed to send e-mail to scott.j.rodgers because no e-mail address is known, and no default e-mail domain is configured
Sending e-mails to: dev@sc.com
Finished: FAILURE

スクリプトの最後の行:

cucumber

そして、「exit 0」を追加するようにアドバイスされましたが、これによりJunitレポートが破損するため、レポートが正しくありません。

4

2 に答える 2

4

キュウリは、スキップされたため、または保留中のテストのために、ゼロ以外のプロセス終了コードを提供すると思います。スキップされたテスト、保留中のテスト、スキップされたテストまたは保留中のテストを実行しないようにして、どの終了コードが表示されるかを確認してください。終了コード(Unixの場合)を確認するには、次のように実行します。

cucumber ...args to select tests... ; echo $?

于 2012-10-21T15:46:19.317 に答える
4

cucumber --strictフラグにより​​、保留中のシナリオがある場合、cucumberは終了コード1を返します(失敗など)。ゼロ以外の終了コードがある場合、Jenkins(または任意のCI)は失敗します。

プロジェクトにcucumber.ymlファイルがあるかどうかを確認します。これは、-strictが隠れている可能性が高いためです。

于 2013-11-26T19:56:45.880 に答える