Forum Discussion
nmrao
10 years agoCommunity Hero
Hoping that you may find the below thread & its comments helpful in this case.
http://stackoverflow.com/questions/28497207/how-to-fail-a-script-assertion-in-soapui/28497531#28497531
http://stackoverflow.com/questions/28497207/how-to-fail-a-script-assertion-in-soapui/28497531#28497531
- Gkm10 years agoContributor
Once again thank you so much nmrao :smileyhappy:
Your comments solved my problem,
def error = [] if (jsonid != dbid) {error.add("jsonid : $jsonid is not equal to dbid: $dbid")} if (jsonname != dbname) {error.add("jsonname : $jsonname is not equal to dbname: $dbname")} assert error.size() == 0," $error " if(error.size() == 0){ log.info "Script Passed" }