karate - Can we call other TestRunner file in the karate feature file
问题描述
trying to call other test runner class (basically its is TestNG file) in the karate feature file. Feature:
Background:
* def processRequest = Java.type('com.walmart.testrunnerclass.processRequest')
Scenario:
Given processRequest.feature
is this the right way of calling. also is there any keywords that needs to be used?
thanks
解决方案
If you mean using a Java class, you can, see the docs: https://github.com/intuit/karate#calling-java
* def JavaDemo = Java.type('com.mycompany.JavaDemo')
* def result = JavaDemo.doWorkStatic('world')
推荐阅读
- javascript - 我可以检测按钮点击是否来自标签
- reactjs - 使用 useEffect 和 useRef 渲染 Light-Weight Chart,但出现错误
- xcode - 更改显示名称后 WatchOS App 崩溃
- libreoffice - 从 libreoffice calc basic 中的“ThisComponent.CurrentSelection”获取行号和列号
- flutter - 如何停止收听父小部件的流构建器正在收听的流?
- azure - Terraform - Azure - 有条件地在可用性集中创建 VM
- c# - 反转具有时间跨度属性的对象列表,同时保持对象之间的时间差
- sql - 有条件地将值放入列中
- spring - 当 Spring @Bean 存储在 ThreadLocal 中时会发生什么?
- javascript - 单击带有输入的标签时只有一个事件