cancel
Showing results for 
Search instead for 
Did you mean: 

How to 'GetData' from an xsd:string

SOLVED
CByler
Contributor

Re: How to 'GetData' from an xsd:string

Wait, I found it. I needed to go up a higher level to the Test Case rather than the Test Step. It worked the first time I did it, however, it seems that SampleXML and GUID Custom Test Case Property values are being retained and when I run the test case the second time it fails as the old APIKey from the first test run is not being refreshed with the new one. Each iteration for AddAPIKey generates a new guid. Is there a way to have those two Custom Test Case Property values  refresh with the new values each time?

troyyerJP
Occasional Contributor

Re: How to 'GetData' from an xsd:string

@CByler wrote:

Wait, I found it. I needed to go up a higher level to the Test Case rather than the Test Step. It worked the first time I did it, however, it seems that SampleXML and GUID Custom Test Case Property values are being retained.....


So you are actually performing an incorrect selection which is causing this issue. At your Test Case Level (Your Test Case is DeleteUserAPIKey), there will be a Property Transfer Test Step that you have named SampleXML. So what is happening, is that every time, you are running the test case, your Property Transfer Step, is retrieving data from itself (The property transfer step has a guid that is not changing) and not the response that has the new guid. Hence why the new guid is not being retrieved. 

 


@CByler wrote:

 don't have the selection of SampleXML in the Property drop-menu

....


Note that in my sample, I named a Custom Test Case Property SampleXML to play around with the data you provided as I dont have the same request/response in my system. In your sample you have named a Property Transfer Test Step SampleXML. This is 2 different things. I hope you have this clear. 

 

If you have a look at point 3 in the Transfer properties page (https://www.soapui.org/docs/functional-testing/properties/transferring-properties) you will see that you would need to select the supplied response from the test step

troyyerJP_1-1616540648748.png

 

 So looking at your screenshot

In Step 2, the Property Transfer step that you named SampleXML  

Source is your the request step AddUserAPIKey (correct)

Property should be Response (because you receive the guid in the Response sent back to you by the service you are invoking with your request in Step 'AddUserApiKey'...you would not see SampleXML)

troyyerJP_0-1616540105086.png

once you select Response, the far right icon to select the field should now show the right data.

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors