ITeye博客

SoapUI Rest测试 随机数 XPATH

asyty · 2011-10-25 08:43 · 测试 · Web前端 · Markdown

Soapui中使用内置方法随机生成整数: ${=(int)Math.random()*2000}

在对xml进行assertion验证时,如果简单的xml没有namespace,例如

 

<xml>
<a>
<b>ccc</b>
</a>
</xml>

 

 

可使用XPATH //*:xml[1]/*:a[1]/*:b[1]/text() 访问到ccc

由于涉及到项目资料,就不贴图了,具体的其他资料请在网上搜索

 

SoapUI Rest测试入门

http://www.soapui.org/REST-Testing/getting-started.html

Rest 测试的资源参数说明

http://www.soapui.org/REST-Testing/understanding-rest-parameters.html

Soapui通过assertion对response验证

http://www.soapui.org/Functional-Testing/getting-started-with-assertions.html

XPath验证

http://www.soapui.org/Functional-Testing/xpath-and-xquery-assertions.html

Demo参照http://www.soapui.org/REST-Testing/getting-started.html

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。