[英]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.