Getting “required (…)+ loop did not match anything

2019-07-11 04:16发布

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')

1条回答
▲ chillily
2楼-- · 2019-07-11 04:58

You are missing a * before the url

Background:
* url dataManagementUrlBase
查看更多
登录 后发表回答