0
Soap UIのテストケース。arraynameを動的に変更する方法は?
1. Datasource feeded for all operators
2. Login call
3. Search List call
4. Verify the search list for each operator
//Defining the SearchList for UserRole
String[] operator1= ["xx","yy","zz","aa"]
String[] operator2= ["bb","cc","dd"]
String[] operator3 = ["bb","cc","aa"]
To Verify the response based on operator I am using below code.
//Extract Reponse and count of nodes
/*
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
respXml=groovyUtils.getXmlHolder("SearchList#ResponseAsXml")
count=Integer.parseInt(respXml["count(//Response[1]/e)"]) */
//Extract Role from
def role = context.expand('${DataSource#Role}')
log.info(role)
for(i=1; i<=count;i++){
element1=role[i-1]
log.info(element1)
}
動的使用の役割を渡すためにどのように..私は役割がoperator1にあるときに「XX」、「YY」、「ZZ」、「AA」を印刷することを期待していますが、残念ながらそれは、異なる長さでopeartor1印刷します。