标签:
import org.custommonkey.xmlunit.* def responseTP=context.expand( ‘${Intraday Table_TP#Response}‘ ) def responseLive=context.expand( ‘${Intraday Table_Live#Response}‘ ) if (responseTP == responseLive) { log.info "Test case pass" assert true } else{ log.info "Test case failed" def xmlDiff = new Diff(responseTP, responseLive) assert xmlDiff.identical() }
或者简洁一点,直接去比较就好了
import org.custommonkey.xmlunit.* def responseTP=context.expand( ‘${Intraday Table_TP#Response}‘ ) def responseLive=context.expand( ‘${Intraday Table_Live#Response}‘ ) def xmlDiff = new Diff(responseTP, responseLive) assert xmlDiff.identical()
[SoapUI] 比较两个不同环境下的Response, 结果不同时设置Test Step的执行状态为失败
标签:
原文地址:http://www.cnblogs.com/MasterMonkInTemple/p/4613346.html