如何解决“不允许访问主机类或主机类不存在”的问题在空手道中
有点沮丧,无法完成这项工作,因为它只是在此链接上记录 https:/ /github.com/karatelabs/karate#calling-java
尝试使用 Maven 原型和独立 jar 从头开始创建,只是为了确保它与文件夹结构无关。请参阅下面的屏幕截图:
更新: 删除参数值中的 .java 后即可工作。
而不是 * def helper = Java.type('examples.users.Helper.java') 将其更改为 * def helper = Java.type('examples.users.Helper')
但仅在从 Eclipse 作为 Cucumber 功能运行时才有效。 仍然无法使其在 vscode 中运行。
A bit frustrated that can't make this work, as it is simply documented on this link https://github.com/karatelabs/karate#calling-java
Tried to create from scratch using maven archetype and the standalone jar just to make sure its not about folder structure. Please see below screenshots:
Update:
It works after removing .java in the parameter value.
instead of * def helper = Java.type('examples.users.Helper.java')
changed it to * def helper = Java.type('examples.users.Helper')
But only works when run as cucumber feature from eclipse.
Still cant make it work in vscode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它在删除参数值中删除.java后起作用。
It works after removing .java in the parameter value.