[SoapUI] 在某个测试步骤下面增加Script Assertion,运用 messageExchange 获取response content
2015-07-14 11:18
531 查看
import com.eviware.soapui.support.GroovyUtils import com.eviware.soapui.support.XmlHolder import org.w3c.dom.Node import org.apache.commons.lang.StringUtils def groovyUtils = new GroovyUtils(context) def xmlHolder =groovyUtils.getXmlHolder(messageExchange.getResponseContent()) String xPath = "//clients/client" Node[] nodeArray = xmlHolder.getDomNodes(xPath) int actualCount = nodeArray.length int expectedCount = context.expand('${#Project#ClientCount}').toInteger() log.info "Actual : nodeArray.length of "+xPath+" : "+actualCount log.info "Expected : nodeArray.length is : "+expectedCount assert actualCount==expectedCount
相关文章推荐
- Functional MRI (second edition) -- 5. MR Contrast Mechanisms and Pulse Sequences
- easyui在ie下要注意的问题
- 芸芸毕业生
- 线性布局
- Assertion failure in -[UICGColor encodeWithCoder:]
- iOS隐藏UITableview下面多余的tableviewcell的线条
- iOS开发:UITableView加载多张照片导致内存上涨的问题
- 相对布局
- hibernate在使用sql查询query自动转化成model类型数据,query.addEntity
- 帧布局
- UITextField各种设置
- [Fri, 3 Jul 2015 ~ Tue, 7 Jul 2015] Deep Learning in arxiv
- ios UITableViewCell重用实现分析
- UILabel自适应里面的文字,自动调整宽度和高度
- iOS8 UISearchViewController搜索功能讲解
- iOS8 UISearchViewController搜索功能讲解 分类: ios技术 2015-07-14 10:23 76人阅读 评论(0) 收藏
- 关于UIButton的title后的自动宽
- AudioQueue(AudioToolBox)的原理与使用
- 当使用easyui时,表单的onchange事件失效
- UINavigationController