Forum Discussion
chathurad
Contributor
Hmmm...Thanks for the responce, But returning blank value also can be possitive output rite?
Lets say we want to get some details of a country and there is an API we need to pass country code,Then API will return country details.
What if we pass an invalid country code.
Then it will return a blank data set with status code 200.
So having blank cant be a assert fail seinario ,Isnt it.
Spoiler
Dont no whether you got my point.
JHunt
6 years agoCommunity Hero
The return value of the script is actually not used by the Script Assertion. The assertion passes as long as the script does not throw an Exception.
In this case, it will throw an AssertionException if there are no countries returned. Otherwise, it will continue and may throw an AssertionException if there is acountry with name not equal to "New Zealand".
Related Content
Recent Discussions
- 2 days agoruchisingh