2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Gaugeですべてのテストが通っているのに全体としてテストが失敗してしまう

Posted at

はじめに

仕事でgaugeを活用しているのですがその中でおきたトラブルが2度目だったのにもかかわらず解決に時間がかかってしまったのでまとめます

問題

Gaugeのテストを実行すると以下のようにすべてのテストが成功しているのに全体としてはエラーになりました

Successfully generated html-report to => /var/test/e2e/gauge/reports/html-report/index.html
 
Specifications:	7 executed	7 passed	0 failed	0 skipped
Scenarios:	16 executed	16 passed	0 failed	0 skipped
 
Total time taken: 2m46.315s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:55 min
[INFO] Finished at: 2023-11-08T10:20:25+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.thoughtworks.gauge.maven:gauge-maven-plugin:1.5.0:execute (default-cli) on project initial-e2e: Gauge Specs execution failed. null: GaugeExecutionFailedException -> [Help 1]

解決方法

テスト実行前のログにエラーがありました

[ParseError] test/e2e/gauge/specs/display.spec:27 Scenario should have atleast one step => ''

実際に該当ファイルを見ると以下のような状態で、コメントだけのテストが存在していました

display.spec
# Display

## メインページ
ログインする
テーブルが表示されている

コメントだけのspecはエラーになるのでなくしたところうまくいきました

おわりに

ログをよく読むのが大事と何度も思っていますが、今回もだめでした

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?