はじめに
転職して最初に利用することになったテストフレームワークGauge
を導入するのにつまづいたところをまとめます
今後ずっと利用していく技術になりそうです
問題
IntellijでGauge
をUI上から実行すると以下のエラーが発生しました
/usr/local/bin/gauge run --machine-readable --hide-suggestion --simple-console /home/watanabejin/workspace/gauge-e2e/specs/example.spec
Testing started at 11:20 ...
2023/02/11 11:20:02 Failed to get configuration from Gauge properties file. Error: open /usr/local/bin/gauge /config/gauge.properties: no such file or directory
2023/02/11 11:20:02 Failed to get configuration from Gauge properties file. Error: open /usr/local/bin/gauge /config/gauge.properties: no such file or directory
2023/02/11 11:20:02 Failed to get configuration from Gauge properties file. Error: open /usr/local/bin/gauge /config/gauge.properties: no such file or directory
2023/02/11 11:20:02 Incorrect value for check_updates in property file. Cannot convert to boolean.
2023/02/11 11:20:02 Failed to get configuration from Gauge properties file. Error: open /usr/local/bin/gauge /config/gauge.properties: no such file or directory
2023/02/11 11:20:02 Failed to get configuration from Gauge properties file. Error: open /usr/local/bin/gauge /config/gauge.properties: no such file or directory
Compatible version of plugin html-report not found. Installing plugin html-report...
Failed to install plugin 'html-report'.
Reason: Could not construct plugin install json file URL. Could not find gauge repository url from configuration.
Compatible version of plugin java not found. Installing plugin java...
Failed to install plugin 'java'.
Reason: Could not construct plugin install json file URL. Could not find gauge repository url from configuration.
Installing required plugins.
Error ----------------------------------
[Gauge]
Failed to start gauge API: Plugin 'java' not installed on following locations : [/usr/local/bin/gauge /plugins]
Get Support ----------------------------
Docs: https://docs.gauge.org
Bugs: https://github.com/getgauge/gauge/issues
Chat: https://github.com/getgauge/gauge/discussions
Your Environment Information -----------
linux, 1.4.3, f98dd40
Could not retrieve plugin information.
プロセスは終了コード 1 で終了しました
mvn test
だとうまくいっており、原因が不明でした
解決方法
これはIntellijのgaugeプラグインが実行するバイナリを知らないのが原因でした
設定からGauge
のプラグインを開いて、Gaugeのバイナリーのパス
を設定すれば動くようになりました
パスの位置は
$ which gauge
でわかります
おわりに
やっとGaugeの設定が終わりました。一苦労でしたが次のステップに進めるのでよかったです