首页 > 解决方案 > 空手道:错误 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 调用做些不同的事情吗?

标签: karate

解决方案


删除Scenario:please 之间的空格:

Scenario:

推荐阅读