Forum Discussion

CXin's avatar
CXin
Frequent Contributor
16 years ago

How to transfer more than one property

Hi Team,

I had a list of ad_id in a response xml.
I want to use Property transfer to pass all of the email_ids to the next test step's request: all_email_ids.
but I can only pass one of the ad_id to it but I need all of them passed and separated by commas.
Such as, I have
<SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope">
<SOAP:Body>
<m:reply xmlns:m="http://www.kijiji.com/soap">
<email_id>1</email_id>
</m:reply>
<m:reply xmlns:m="http://www.kijiji.com/soap">
<email_id>2</email_id>
</m:reply>
<m:reply xmlns:m="http://www.kijiji.com/soap">
<email_id>3</email_id>
</m:reply>
</SOAP:Body>
</SOAP:Envelope>

in the next step's request, there is a variable named all_email_ids.
I want to pass all of the above email_id to all_email_ids.
So the value of all_email_ids should be <all_email_ids>1,2,3<all_email_ids>

Can you help?

Thank you in advance!

2 Replies

  • Hi!

    hmm.. I think it would be easiest for you to create a groovy script teststep that does this for you, ie uses xpath to iterate the email_ids and writes the result to a testcase property that you can refer to via property-expansion in your request.

    Does that make sense?

    regards!

    /Ole
    eviware.com
  • CXin's avatar
    CXin
    Frequent Contributor
    Hi Ole,

    I don't know groovy.
    Is there other way to do?

    do you have some doc for groovy?