得到“必需的(...)+循环与输入'方案:'中的任何内容都不匹配".黄瓜中使用“背景"部分时出现错误 [英] Getting "required (...)+ loop did not match anything at input 'Scenario:'" error when using Background section in cucumber

查看:1208
本文介绍了得到“必需的(...)+循环与输入'方案:'中的任何内容都不匹配".黄瓜中使用“背景"部分时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个空手道DSL测试来测试Web服务端点.我已经在karate-config.js文件中定义了我的网址库.但是,当我尝试在背景"部分中使用它时,出现以下错误.请帮忙.在下面提供了我的功能文件.

I am writing a Karate DSL test to test a web service end point. I have defined my url base in karate-config.js file already. But when I try to use this in the Background section, I am getting the below error. Please help. Provided my feature file below.

错误:必需(...)+循环与输入'方案:'上的内容不匹配"

Error: "required (...)+ loop did not match anything at input 'Scenario:'"

Feature: Test Data Management service endpoints that perform different operations with EPR

    Background:
     url dataManagementUrlBase

    Scenario: Validate that the contractor's facility requirements are returned from EPR
    Given path 'facilities'
    And def inputpayload = read('classpath:dataManagementPayLoad.json')
    And request inputpayload
    When method post
    Then status 200
    And match $ == read('classpath:dataManagementExpectedJson.json')

推荐答案

您在url

Background:
* url dataManagementUrlBase

这篇关于得到“必需的(...)+循环与输入'方案:'中的任何内容都不匹配".黄瓜中使用“背景"部分时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆