Forum Discussion
dvallabhuni
15 years agoNew Contributor
But how to handle dynamic data (Testcase properties/global properties) in REST requests for below case???
For SOAP request I was able to use the test case/global properties for a test step which is a SOAP request in XML containing some part of code as,
e.g.:
<ns14:OrderData>
<ns14:DoctorID>${#TestCase#sDoctorID}</ns14:DoctorID>
<ns14:PatientID>${#TestCase#Input_Patient_id}</ns14:PatientID>
</ns14:OrderData>
However, a REST request that accepts media-type application/XML and the body in the XML editor, I modified the request body to contain dynamic data which is imported at the testcase level/global level from external property file similar to above code.
I used the syntax as above but it was coming hard coded (i.e. as ${#TestCase#sDoctorID} ) in the response as well. I mean it's not able to send the dynamic value the property variable at run time.
Same time the REST request assertions are able to handle the test case property values with no issues for the same request.
Requesting any one in the forum or eviware team to look into this.
For SOAP request I was able to use the test case/global properties for a test step which is a SOAP request in XML containing some part of code as,
e.g.:
<ns14:OrderData>
<ns14:DoctorID>${#TestCase#sDoctorID}</ns14:DoctorID>
<ns14:PatientID>${#TestCase#Input_Patient_id}</ns14:PatientID>
</ns14:OrderData>
However, a REST request that accepts media-type application/XML and the body in the XML editor, I modified the request body to contain dynamic data which is imported at the testcase level/global level from external property file similar to above code.
I used the syntax as above but it was coming hard coded (i.e. as ${#TestCase#sDoctorID} ) in the response as well. I mean it's not able to send the dynamic value the property variable at run time.
Same time the REST request assertions are able to handle the test case property values with no issues for the same request.
Requesting any one in the forum or eviware team to look into this.