TA的每日心情 | 开心 2017-5-4 11:29 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
请问下大家,我用soapui做测试,添加断言判断:
def root = net.sf.json.JSONSerializer.toJSON(messageExchange.responseContent)
log.info root.get("id")
assert root.id.equals(context.expand('${Properties1#id}'))
log.info context.expand('${Properties1#id}')
运行报错:assert root.id.equals(context.expand('${Properties1#id}')) | | | | | | 53 false | 53 | [ThreadIndex:0, RunCount:0] net.sf.json.JSONObject@5d98453d (toString() threw groovy.lang.GroovyRuntimeException
但是单独运行:
def root = net.sf.json.JSONSerializer.toJSON(messageExchange.responseContent)
log.info root.get("id")
log.info context.expand('${Properties1#id}')
结果是pass的,出来的id是一样的。怎么就是加了assert那句话就不对了呢?是什么?有大神能帮忙解答下吗?谢谢 |
|