无法运行空手道测试 [英] Unable to Run Karate Tests
本文介绍了无法运行空手道测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在我的功能中运行空手道测试
package api;
import com.intuit.karate.junit4.Karate;
import org.junit.runner.RunWith;
@RunWith(Karate.class)
public class PagesRunner {
}
this is the report which gets generated
我的功能文件:
Feature: some Adaptor Request Success
Background:
* def myUrl = baseURL
* configure headers = read('classpath:some-headers.js')
Scenario: Some Adaptor Success
* def someInitiate= read('classpath:requests/someRequest.json')
* url myUrl
Given path 'api/somerequest'
And request someInitiate
When method post
Then status 202
不确定我在这里遗漏了什么。对API自动化世界非常陌生。如有任何帮助,不胜感激。
推荐答案
我建议您按照快速入门示例开始操作。
https://github.com/intuit/karate#quickstart
mvn archetype:generate
-DarchetypeGroupId=com.intuit.karate
-DarchetypeArtifactId=karate-archetype
-DarchetypeVersion=0.8.0
-DgroupId=com.mycompany
-DartifactId=myproject
然后尝试无问题地运行UsersRunner.java
|users.feature
。然后您就可以在此基础上继续发展。
这篇关于无法运行空手道测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文