[英]How to use custom path in karate feature file?
In the karate feature file, classpath is - "scr/test/java"在空手道特征文件中,类路径是 - "scr/test/java"
But instead, the detailed "classpath:examples/resources/module1/sub_module/test.json" path, Is there any other way that hides the detailed path?但是,详细的“classpath:examples/resources/module1/sub_module/test.json”路径,还有其他隐藏详细路径的方法吗? like
喜欢
Here, My expectation is Instead of在这里,我的期望是
I want to use我想用
Just use a variable?只使用一个变量?
* def myPath = 'classpath:foo/bar/'
And then later:然后后来:
* def file1 = read(myPath + 'test.json')
More hints on variable substitution can be found here: https://stackoverflow.com/a/73230200/143475更多关于变量替换的提示可以在这里找到: https://stackoverflow.com/a/73230200/143475
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.