簡體   English   中英

我們可以在空手道特征文件中調用其他TestRunner文件嗎

[英]Can we call other TestRunner file in the karate feature file

試圖在空手道功能文件中調用其他測試運行程序類(基本上它是 TestNG 文件)。 特征:


  Background:
    * def processRequest = Java.type('com.walmart.testrunnerclass.processRequest')

    Scenario:
      Given processRequest.feature 

這是正確的調用方式嗎? 還有需要用到的關鍵字嗎?

謝謝

如果您的意思是使用 Java 類,則可以查看文檔: https : //github.com/intuit/karate#calling-java

* def JavaDemo = Java.type('com.mycompany.JavaDemo')
* def result = JavaDemo.doWorkStatic('world')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM