Hi
Sandro2020,
I don't think theres an option to do this via the embedded functionality per se; are you thinking about having the empty attributes/element removal so you can use the looping functionality? Id think about this option carefully, the reason being its likely youd want different assertions for your negative tests to your positive tests.
If i use loops, the assertions have to be relevant to all the test scenarios you are executing in your loop.
Typically i have a looping testcase for my positive scenarios and a looping testcase for my negative test cases. Obviously id have different datasources configured for my positive and negative tests.
If i was going to try and do what you suggest, (remove the attributes and tag) id use groovy.
However i have a couple of questions/thoughts you also might want to think about.
Considering the root and extension are attributes of the value element, are you sure the system youre testing would actually remove the value tag also if the value element's attributes are empty? Cos thats quite unusual.
Are there any other elements enclosed within the providerOrganizationID parent/container element as well as the value element? Reason i ask is that if your system uses the approach of removing elements when empty (xml uses a lot of bandwidth so software architects like to remove any tag that isnt populated), then its reasonable to expect the container element (providerOrganizationID) to be removed also....?
That's it for me....one of the other forum members might have some alternative ideas.
Nice one,
Rich