Grails geb从命令行获取参数 [英] Grails geb getting parameters from commandline
本文介绍了Grails geb从命令行获取参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在用grab写我的ui测试. 我想从命令行使用Maven启动测试.这很好. 我的命令: mvn -Dtest = CheckMenuLinks测试
I am writing my ui tests with geb in grails . I want to start the tests from command line with maven. This works fine. My command: mvn -Dtest=CheckMenuLinks test
现在,我想从命令行传递一些测试参数.这可能吗?
Now I want to pass some parameters for tests from commandline. Is this possible?
推荐答案
我找到了解决方案: 我只添加一些参数,例如: -Dmytest = myparameter
I found the solution: I just add some parameter like: -Dmytest=myparameter
我可以在gebconfig中使用以下参数:
I can use this parameter in gebconfig with:
System.getProperty("mytest")
这篇关于Grails geb从命令行获取参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文