Forum Discussion
JustinM89
7 years agoContributor
If you just need to check that clients has child elements, I would use a Groovy script assertion. Add the assertion, right-click in the script editor and then click Get Data. Choose the test step that returns this JSON, then select 'Response' and select the clients node.
It will then add something like this to the editor:
def response = context.expand( '${Your step name#Response#$[\'clients\']}' )
response will be a string, but you can use Groovy truth to determine that it is not empty/null by doing
assert (response)
If clients has no children, this assertion will fail
Related Content
- 8 years agorvteja1990
- 8 years agomgroen2
- 5 years agofmensah