我正在使用路径关键字来自Karate API框架来连接字符串以形成一个url。但是,我无法通过'?'。这是我在做什么:空手道API测试 - 转义'?'在功能文件中的url
Background:
* url 'https://api.cloud.abcde.com/animal/'
Scenario: Verify the get status
Given path 'herbivore?id=25'
When method get
Then status 200
当我运行测试时,我看到'?'作为%3F传递。我试图用\逃避它,并尝试了其他一些答案,但无法成功。我需要使用网址编码吗?任何指针或帮助将不胜感激。 感谢
不知道,但你尝试了双反斜线\\ ......在空手道框架 – Grasshopper
@Grasshopper - 它没有工作 – Saurabh