【发布时间】:2020-02-18 12:57:37
【问题描述】:
我有这个:
Background:
* url 'http://localhost:15672/api/exchanges/%2F/my_exchange'
Scenario:
Given path 'publish'
这里的问题是url被解析为:
http://localhost:15672/api/exchanges///my_exchange/publish
代替:
http://localhost:15672/api/exchanges/%2F/my_exchange/publish
谢谢
已编辑:
我会改进这个问题。
我在这里上传了一个非常简单的项目:https://github.com/italktothewind/karate-encoding
它有一个监听/bar/%2F/foo的wiremock
此功能有效:
Feature: Working example
Scenario:
Given url 'http://localhost:1081/bar/%2F/foo'
When method get
Then status 200
但是这个功能不起作用(我在项目中放了一个@ignore标志,所以它可以成功构建):
Feature: Non working example
Background:
* url 'http://localhost:1081/bar/%2F'
Scenario:
Given path 'foo'
When get
Then status 200
这两个功能的区别在于url和path的使用。
【问题讨论】:
标签: karate