如空手道0.7.0中所述,环境切换命令无法正常工作 [英] Environment switching command is not working as documented in karate 0.7.0

查看:68
本文介绍了如空手道0.7.0中所述,环境切换命令无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://github.com/intuit/karate 的交换环境"部分中列出了以下命令,以在karate-config.js中选择环境:

In the "Switching Environment" section of https://github.com/intuit/karate the following command is listed to select the environment within the karate-config.js:

mvn测试-DargLine =-Dkarate.env = mock"

mvn test -DargLine="-Dkarate.env=mock"

这导致karate.env为空.

That results in karate.env being null.

如果您按以下方式修改命令,则会设置变量:

If you modify the command as follows the variable is set:

mvn测试-Dkarate.env = mock

mvn test -Dkarate.env=mock

我正在使用0.7.0

I'm using 0.7.0

推荐答案

对我来说这是个新闻.可能是由于Maven版本.您能否清楚了解您的操作系统版本和Maven版本,并提出解决文档的问题.请注意,从未有人报告过此事.

That's news to me. Probably due to the Maven version. Can you be clear about your OS version and Maven version and raise an issue to fix the doc. Do note that no one has ever reported this.

另外,您的行家pom.xml很有可能具有<properties>条目,并带有键<karate.env> ,这就是为什么您看到此行为的原因!

Also, it is quite likely your maven pom.xml has a <properties> entry with the key <karate.env> and that is why you are seeing this behavior !

这篇关于如空手道0.7.0中所述,环境切换命令无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆