[英]How to pass a variable as an argument to a CasperJS script through the command line?
[英]How to pass an option in to the frisby test through command line
我必须基于REST API编写一些测试基础。 每次运行测试服时,终点可能会改变。
是否可以在命令行中传递终点选项。 例如
jasmine-node --endpoint http://localhost:8080 test-folder
最后,我找到了一种方法。 茉莉添加命令行选项来传递参数如下:
jasmine-node --config <name> <value>
例如:
jasmine-node --config endpoint http://localhost:9091 digidoki
可以访问以下var来访问配置:
process.env['endpoint']
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.