簡體   English   中英

如何使用屬性傳遞將帶有響應的refresh_token從響應傳遞到具有串聯的請求:TestSuite soapui

[英]How to use Property Transfer to pass refresh_token from Response to request with concatenation : TestSuite soapui

當我使用jsonPath來獲取帶有grant_type = refresh_token的刷新令牌+串聯的值時,結果只是toke的值

當我使用jsonPath來獲取帶有Grant_type = refresh_token的刷新令牌+串聯的值時,結果僅為令牌的值

我的來源是POST請求。 此POST請求返回了一個JSON。 我需要將帶有grant-type = refresh_token的refresh_token的值傳遞給下一個POST請求。

目標”框中表達式必須是XPath或JsonPath表達式,以表示您希望該屬性在下一個請求中結束。 我不知道您的消息的形狀,因此一種可能的解決方案是創建一個名為refresh_token的測試用例屬性,然后在其中傳輸令牌的值:

在此處輸入圖片說明

然后,在下一個請求中,可以將此屬性與串聯字符串一起使用,如下所示:

${= 'grant_type=refresh_token&refresh_token=' + context.expand( '${#TestCase#refresh_token}'}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM