我正在使用路徑關鍵字來自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