简体   繁体   English

如何通过命令行将选项传递给frisby测试

[英]How to pass an option in to the frisby test through command line

I have to write some test base on a REST API. 我必须基于REST API编写一些测试基础。 The end point may change each time running test suits. 每次运行测试服时,终点可能会改变。

Is it possible to pass end point option at command line. 是否可以在命令行中传递终点选项。 For example 例如

jasmine-node --endpoint http://localhost:8080 test-folder

Finally, I found a way. 最后,我找到了一种方法。 Jasmin add a command line option to pass parameter as follow: 茉莉添加命令行选项来传递参数如下:

jasmine-node --config <name> <value>

for example: 例如:

jasmine-node --config endpoint http://localhost:9091 digidoki

Configs are accessible throw the following var: 可以访问以下var来访问配置:

process.env['endpoint']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM