![](/img/trans.png)
[英]How to use ResultSet returned by java method in SOAPUI with groovy script?
[英]How to use LinkedHashMap collection in Groovy Script - SoapUI?
我在SoapUI測試套件中使用了Groovy Script步驟。 在腳本中,我正在嘗試將linkedhashmap和其他兩個字符串參數一起傳遞給該方法。
LinkedHashMap<String,String> suitesInfo = new LinkedHashMap<String,String>();
suitesInfo.put(request_1,context.testCase.getPropertyValue(request_1 + "_RESPONSE_STATUS"))
suitesInfo.put(request_2,context.testCase.getPropertyValue(request_2 + "_RESPONSE_STATUS"))
suitesInfo.put(request_3,context.testCase.getPropertyValue(request_3 + "_RESPONSE_STATUS"))
String tSuiteName = sheetName
String tcID = context.testCase.getPropertyValue("TC_ID")
//Pass the tcID, tSuiteName and Map to the method writeTestSuiteStatusInExcel()
writeTestsuiteStatusInExcel(tSuiteName,tcID,suitesInfo);
在執行此腳本時,我收到了這樣的錯誤消息。
groovy.lang.MissingMethodException: No signature of method: Script6.writeTestsuiteStatusInExcel() is applicable for argument types: (java.lang.String, java.lang.String, java.util.LinkedHashMap) values: [A, 1234567, [PUT Request:PASS, GET Request:PASS, ...]] Possible solutions: writeTestSuiteStatusInExcel(java.lang.String, java.lang.String, java.util.LinkedHashMap) error at line: 133
所以我不明白我在這里犯了什么錯誤。 任何人都可以糾正我的腳本來完成我的任務。
謝謝
您在方法名稱中有誤:
writeTestsuiteStatusInExcel(tSuiteName,tcID,suitesInfo)
應該
writeTestSuiteStatusInExcel(tSuiteName,tcID,suitesInfo)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.