繁体   English   中英

如何在空手道功能文件中使用自定义路径?

[英]How to use custom path in karate feature file?

在空手道特征文件中,类路径是 - "scr/test/java"

但是,详细的“classpath:examples/resources/module1/sub_module/test.json”路径,还有其他隐藏详细路径的方法吗? 喜欢

在这里,我的期望是

  • def file1 = read(classpath:examples/resources/module1/sub_module/test.json)

我想用

  • def file1 = read(customclasspath:test.json) 或类似的可以隐藏功能文件中任何文件的完整路径详细信息。

只使用一个变量?

* def myPath = 'classpath:foo/bar/'

然后后来:

* def file1 = read(myPath + 'test.json')

更多关于变量替换的提示可以在这里找到: https://stackoverflow.com/a/73230200/143475

暂无
暂无

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

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