jpchenot
13 years agoNew Contributor
Help setting up "Run TestCase"
Hi.
I am trying to set up a "Run TestCase" test step, however, the test step I am trying to call must return a value. I have figured out as much as creating a property for the test case that I am calling.
My problem is how do I return a value from this particular test case's response in the property.
An example to illustrate this:
At the moment I am using this syntax in "returnvalue" to get the value from the response of testcase2: ${GetMediaSupplierUsers#Response#//GetMediaSupplierUsersResult/a:MediaSupplierUserDto[0]/a:MediaSupplierId[0]/text()}
I hope this makes sense.
Any help would be very much appreciated.
EDIT:
below is the response I am trying to get the value from:
I am trying to set up a "Run TestCase" test step, however, the test step I am trying to call must return a value. I have figured out as much as creating a property for the test case that I am calling.
My problem is how do I return a value from this particular test case's response in the property.
An example to illustrate this:
- Create "Run TestCase" TestStep called "teststep1"
- "teststep1" is calling "testcase2" which is located in another TestSuite
- "testcase2" has a property called "returnvalue"
- "returnvalue" is populated with a value from the response of "testcase2" after it has executed
- the value of "returnvalue" is available in "teststep1"
At the moment I am using this syntax in "returnvalue" to get the value from the response of testcase2: ${GetMediaSupplierUsers#Response#//GetMediaSupplierUsersResult/a:MediaSupplierUserDto[0]/a:MediaSupplierId[0]/text()}
I hope this makes sense.
Any help would be very much appreciated.
EDIT:
below is the response I am trying to get the value from:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetMediaSupplierUsersResponse xmlns="http://contracts.domain.com/instance">
<GetMediaSupplierUsersResult xmlns:a="http://schemas.domain.com/instance" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:MediaSupplierUserDto>
<a:CreatedOn>2013-06-25T14:59:47.25</a:CreatedOn>
<a:FullName>Full Name</a:FullName>
<a:IsActive>true</a:IsActive>
<a:MediaSupplierAttributeCode>Attribute Code</a:MediaSupplierAttributeCode>
<a:MediaSupplierId>6</a:MediaSupplierId>
<a:MediaSupplierName>Supplier Name</a:MediaSupplierName>
<a:MediaSupplierUserId>28</a:MediaSupplierUserId>
<a:UpdatedOn i:nil="true"/>
</a:MediaSupplierUserDto>
</GetMediaSupplierUsersResult>
</GetMediaSupplierUsersResponse>
</s:Body>
</s:Envelope>