rakshitbachary
13 years agoNew Contributor
Setting properties at test case level from request
Dear Members,
I am newbie to groovy scripting. As part of my assignment, I have to set test case level properties. I have below request in hand for which I have to set properties at test case level.
Properties that will be set for the above request will be as below
I am having lot more iterations for the files. Doing this manually is getting much troubled. Please help me with a groovy code so that these properties can be automatically set at test case level.
Thanks in advance
Regards
Rakshit
I am newbie to groovy scripting. As part of my assignment, I have to set test case level properties. I have below request in hand for which I have to set properties at test case level.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:webs="http://webs">
<soapenv:Header/>
<soapenv:Body>
<webs:SaveFilePropertiesRequest>
<webs:File>
<webs:FileName>fileNameValue#1</webs:FileName>
<webs:FilePath>filePathValue#1</webs:FilePath>
<webs:FileType>fileTypeValue#1</webs:FileType>
<webs:FileSize>fileSizeValue#1</webs:FileSize>
</webs:File>
<webs:File>
<webs:FileName>fileNameValue#2</webs:FileName>
<webs:FilePath>filePathValue#2</webs:FilePath>
<webs:FileType>fileTypeValue#2</webs:FileType>
<webs:FileSize/>
</webs:File>
</webs:SaveFilePropertiesRequest>
</soapenv:Body>
</soapenv:Envelope>
Properties that will be set for the above request will be as below
FileName#1
FilePath#1
FileType#1
FileSize#1
FileName#2
FilePath#2
FileType#2
FileSize#2
I am having lot more iterations for the files. Doing this manually is getting much troubled. Please help me with a groovy code so that these properties can be automatically set at test case level.
Thanks in advance

Regards
Rakshit