SoapUI????Groovy????????????request??
???????????? ???????[ 2014/10/13 15:58:51 ] ?????????????????? SoapUI
????????????Groovy??????????????????????????????????μ????request??????????????????????
????1.??Groovy???????????"setUp"
def num = Integer.parseInt(testRunner.testCase.getPropertyValue( "count" ))
log.info num
num = (++num) % 2
testRunner.testCase.setPropertyValue( "count"?? num + "")
String[] acList = ["Loginn"+String.valueOf(Math.random()).substring( 0?? 5 )??"Loginn"+String.valueOf(Math.random()).substring( 0?? 6 )]
log.info num
log.info acList[num]
acList[num]
???????????????????????????????????????request??????д???????????dataloop????????????????????request?У????????request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.soapui.org/sample/">
<soapenv:Header/>
<soapenv:Body>
<sam:login>
<username>${setUp#result}</username>
</sam:login>
</soapenv:Body>
</soapenv:Envelope>
????2.??Groovy???????????"demo"
????testRunner.testCase.testSuite.getTestCaseByName("TestCaseDemo").setPropertyValue("username"??"Loginn"+String.valueOf(Math.random()).substring( 0?? 5 ))
????testRunner.testCase.testSuite.getTestCaseByName("TestCaseDemo").setPropertyValue("password"??"Loginn123")
??????????????У?TestCaseDemo???testcase?????????request??????д:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.soapui.org/sample/">
<soapenv:Header/>
<soapenv:Body>
<sam:login>
<username>${#TestCase#username}</username>
<password>${#TestCase#password}</password>
</sam:login>
</soapenv:Body>
</soapenv:Envelope>
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11