0
我是SoapUI工具的新手。我使用SoapUI版本5.3.0我的應用程序有幾個RESTful API。我必須在如下JSON請求的形式發送到WebService的請求:使用SoapUI發送多個json請求(加載測試)
{
"app_key":"i8gAVDwcAq40n2kAv6Ox+w==",
"targetDB":"100",
"createNew": "true"
}
截至目前,我能夠在每一步發送一個請求,並如下得到一個滿意的答覆:
<StartDataExtractResult xmlns="http://schemas.datacontract.org/2004/07/AriaTechCore" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<StatusCode>1</StatusCode>
<StatusText>success</StatusText>
<RequestNumber>100</RequestNumber>
</StartDataExtractResult>
我的問題是如何在一個循環中發送多個請求(50,100,500)請求到Web服務器,以1秒的間隔更改屬性「targetDB」(例如100,101,102 ...) ?
使用Soap UI 5.3.0。
任何幫助/指針都會非常有幫助。
這是我的項目看起來像: My Project Structure
感謝您的幫助。我試圖用各種可能的值來實現你所建議的groovy腳本,例如<< def targetdb =(context.expand('$ {#startDataExtract#TARGET_DB}')爲整數?:0)+ 1 log.info「當前請求的目標數據庫:$ {targetdb}」 context.testCase.setPropertyValue ('TARGET_DB',targetdb.toString())>>但每次我面對一個NumberFormat異常,如下所示:java.lang.NumberFormatException:對於輸入字符串:「」error at line:1' – DebanjanB
@Dev,對不起,解決了問題並更新了答案。請嘗試。 – Rao
@Dev,你試過更新的答案嗎? – Rao