Ask a Question

How can I datasink all the values of a given parent when they have the same name?

jg0888
Contributor

How can I datasink all the values of a given parent when they have the same name?

I am currently trying to run a Data Source loop test that will pull multiple child values from one parent value:

 

Example: 

<employeeList>
<employeeId>Z62376</employeeId>
<employeeId>Z37464</employeeId>
<employeeId>Z37104</employeeId>
<employeeId>Z32160</employeeId>
<employeeId>Z30336</employeeId>
<employeeId>Z30312</employeeId>
<employeeId>Z30288</employeeId>
<employeeId>Z30264</employeeId>
<employeeId>Z30240</employeeId>
<employeeId>Z30216</employeeId>
<employeeId>Z30192</employeeId> 

</employeeList>

 

Is this possible to iterate through each of these employeeId values to then search based on each one with a different method?

 

Thanks for any help you can provide!

10 REPLIES 10
Lucian
Community Hero

Hey,

 

Doesn't it work out of the box with the XML Datasource?



If my answer helped please click on the 'Accept as Solution' button.

It works if I know how many employeeIds will be returned, and I create a property for each. I was just hoping there was a way to retreive all the information without creating a property for each column. (See attachment)

 

Also, I tried using a wildcard for the "Column XPaths:" but it would not return any values.

richie
Community Hero

Hey!

I had a similar situation recently and i just created a large number of properties to get around this which is NOT an efficient, rigorous way of doing it. So if anyone knows an approach to handle this in a more rigorous approach i'd be very grateful!

Cheers,

Richie
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Lucian
Community Hero

Spent some time on it. I am pretty sure this is a bug. I created a support request for it. Will keep you posted!



If my answer helped please click on the 'Accept as Solution' button.

@Lucian - Will the fix be for using a wildcard value in the Column XPath of the DataSource test step?

Lucian
Community Hero

No idea. I don't work for SmartBear so I don't know what the exact problem is nor what the fix will involve.

Still waiting for an answer for my support ticket...


If my answer helped please click on the 'Accept as Solution' button.

HI @Lucian, Thanks for the update and i had a similar issue mentioned here.

 

https://community.smartbear.com/t5/SoapUI-Pro/ReadyAPI-Datasink-How-to-save-multiple-rows-from-respo...

 

expexcting a reply from smartbear on the bug and it would be great if they do a point release with the fix.

@Lucian - Thank you for your help! I'll wait patiently for a response as well.

Lucian
Community Hero

Hey,

 

This is the answer I received for my support ticket:

 

Hi Ardelean,

Unfortunately, it's a bug. We have registered it in our system - RIA-7733.

I've linked your case to it to be able to notify you when it's fixed.

 

Regards,
Kirill Zakharov
SmartBear Customer Care


If my answer helped please click on the 'Accept as Solution' button.
cancel
Showing results for 
Search instead for 
Did you mean: