karate - 空手道:错误 com.intuit.karate.core.FeatureParser - 不是有效的功能文件:不匹配的输入 'S' 期望
问题描述
我正在尝试使用空手道 1.1.0 自动化 SOAP 服务,当我运行测试时,我收到以下错误
ERROR com.intuit.karate.core.FeatureParser - not a valid feature file: features/syncSupplier/syncSupplier.feature - mismatched input 'S' expecting <EOF>
特征文件
@SyncSupplierFeature
Feature: SyncSupplier service
Background:
* url 'https://qaintservices.abc.com:4445/int/services/SyncSupplierService/1.4'
* configure ssl = true
Scenario : Send valid Supplier message to the service
* def syncSupplierRequest = read('syncSupplierRequest.xml')
Given request syncSupplierRequest
When soap action '/services/SupplierService'
Then status 200
测试人员
import com.intuit.karate.junit5.Karate;
class TestRunner { @Karate.Test
Karate testSyncSupplier() {
return Karate.run("features/syncSupplier/syncSupplier").relativeTo(getClass());
} }
我不确定是不是因为 https://。我已经自动化了其他休息服务,这些服务运行良好,但它们都有 http://。我应该为 https 调用做些不同的事情吗?
解决方案
删除Scenario
和:
please 之间的空格:
Scenario:
推荐阅读
- java - NoSuchMethodError: org.springframework.util.ObjectUtils.identityToString(Ljava/lang/Object;)Ljava/lang/String
- c++ - Opencv如何从相机读取单帧
- java - 通过 Spring Boot JPA 在 MySQL 中处理空(零)月或日的最佳实践
- c++ - 如何在 C 中使用空的 main() 方法运行函数?
- javascript - 如何以不同的方式使用 TopTabNavigation 和 BottomTabNavigation?
- java - 写一个方法isAbleToFly(),不带参数,返回真假?
- r - 将数据分配给 R 中最近的采样点
- python - python elemnttree把我扔“杀”
- java - 使用 JUnit 测试 Maven 插件并使用 Test-POM
- r - 如何设置正在运行的 R flexdashboard 中的列数