【问题标题】:Passing Variable in url - Karate在 url 中传递变量 - 空手道
【发布时间】:2018-10-04 10:15:31
【问题描述】:

我尝试了以下功能来传递带有变量的 url,但它失败了。请给建议。或者我们不能尝试这样的 URL?我在 Karate-config 中给出了 demoBaseURL。

Background:

* url demoBaseUrl

Scenario Outline: Check Request and Response 

Given url 'http://abc/web/juk/nmr/Accounts('<accountNumber>')'
    When method GET
    Then status 200
    And match $ == read('AccountResponse.json')
    And print 'response: ', response

示例: |帐号 | | PPB00001694 |

【问题讨论】:

    标签: karate


    【解决方案1】:

    请仔细阅读path 上的文档。尝试以下更改:

    Scenario Outline: Check Request and Response 
    
    Given path '<accountNumber>'
    When method GET
    Then status 200
    And match $ == read('AccountResponse.json')
    And print 'response: ', response
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多