接口测试之——soapui学习(5)

上一篇 / 下一篇  2011-10-18 16:20:34 / 个人分类:接口测试

注:(该文转自流口水的小猪的博客,因为分享不过来所以就copy了

通过(4)的学习,我们知道了soapUI提供的多种类型的assertion,那么我们来看看常用的assertion

首先看看assertion的管理

SoapUI学习(5)- soapui的assertion - 流口水的小猪 - 轨迹

我们常用的

  • Contains - checks for the existence of a specified string (see below)
  • Not Contains - checks for the non-existence of a specified string (see below)
  • Reponse SLA - check the response time against a specified value (see below)
  • XPath Match - compares the result of an XPath expression to an expected value   (估计用的不多)
  • XQuery match - compares the result on an XQuery expression to an expected value (估计用的不多)
  • Script. - runs an arbitrary script. that can be used to validate the received message as desired

其中的contains/Not Contains 基本差不多,添加的界面如下

SoapUI学习(5)- soapui的assertion - 流口水的小猪 - 轨迹
其中一是要注意可以忽略大小写
       二是可以用正则表达式,这个东东还是可以去实践实践的,学习地址在http://www.jdocs.com/javase/7.b12/java/util/regex/Pattern.html


TAG:

 

评分:0

我来说两句

Open Toolbar