Forum Discussion
nmrao
Champion Level 3
You mean just value of the element nil or don't get response at all?
Any ways, you will have better control if you use Script Assertion.
Any ways, you will have better control if you use Script Assertion.
keanesean
7 years agoOccasional Contributor
Hi Rao,
I mean receiving the element with nil = true as per example below. I will look into your suggestion of scripting the assertion instead.
<Reason xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
- PaulMS7 years agoSuper Contributor
You could also use 2 separate assertions with XPath expressions //Log/Activity and //Log/Agent
- keanesean7 years agoOccasional Contributor
Yes, I had considered that also, but the xml I provided is only part of the overall response, so would need a lot of assertions :(
- groovyguy7 years agoChampion Level 1
If my test tends to require a lot of XPATH matches, I tend to compile them all into one groovy script test.
Related Content
- 10 months agooriShalhon
- 3 years agokflood