qtp监听请求响应时间,服务器ip,…
来源:互联网 发布:邓小平网络纪念馆留言 编辑:程序博客网 时间:2024/06/08 07:25
qtp结合httpwatch监听请求响应时间,服务器ip,返回状态码,从而对出错的接口进行简单分析
DimURL
DimlinkStatue
URL="www.baidu.com"
Setcontrol=CreateObject("HttpWatch.Controller")
Setplugin=control.IE.New()
plugin.Log.EnableFilter(false)
plugin.Clear()
plugin.Record()
plugin.GotoURL(URL)
wait(2)
Browser("百度一下,你就知道").Page("百度一下,你就知道").Link("新闻").Click
ip= plugin.log.Entries.Item(0).ServerIP ''获取iP地址
code= plugin.Log.Entries.Item(0).StatusCode''获取状态码
linktime= plugin.log.Entries.Summary.Time''获取相应时间
If10>linktime Then
Reporter.ReportEventmicPass,"响应时间爱","少于10秒:"&linktime
else
Reporter.ReportEventmicFail,"响应时间","大于10秒:"&linktime
EndIf
If400 > code Then
Reporter.ReportEventmicPass, "状态码:"&code
else
Reporter.ReportEventmicFail, "状态码:"&code
ExitAction
EndIf
'停止记录Http底层数据
plugin.Stop
'获取返回的状态码
''关闭浏览器窗口
plugin.CloseBrowser()
''回收对象
Setcontrol=nothing
Setplugin=nothing
Setsumary=nothing
Dim
Dim
URL="www.baidu.com"
Set
Set
plugin.Log.EnableFilter(false)
plugin.Clear()
plugin.Record()
plugin.GotoURL(URL)
wait(2)
Browser("百度一下,你就知道").Page("百度一下,你就知道").Link("新
ip
code
linktime
If
Reporter.ReportEvent
else
Reporter.ReportEvent
End
If
Reporter.ReportEvent
else
Reporter.ReportEvent
ExitAction
End
'停止记录Http底层数据
plugin.Stop
'获取返回的状态码
''关闭浏览器窗口
plugin.CloseBrowser()
''回收对象
Set
Set
Set
0 0
- qtp监听请求响应时间,服务器ip,…
- Fidder监控请求响应时间(毫秒)和请求IP
- 服务器请求响应原理
- 使用eclipse中的tcp/ip监听webservice请求和响应数据
- 页面响应时间,请求响应时间
- 测试服务器响应时间
- Charles_N:HTTP请求响应监听工具
- java httpSever 实现请求监听与响应
- JSP客户端请求,服务器响应
- 服务器的请求和响应
- web服务器请求响应全过程
- JS请求服务器时间
- loadrunner 中的90%的请求响应时间
- java中请求响应时间监控
- Tomcat日志打印请求响应时间
- Linux使用curl查看请求响应时间
- Tomcat请求处理(一) -- 服务器端口监听
- fiddler添加查看IP和响应时间
- MySQL查询语句练习题,测试足够用…
- MySQL插入、更新与删除数据 …
- Centos下安装Django
- Centos下安装pycharm
- 响应时间/并发用户数/吞吐量…
- qtp监听请求响应时间,服务器ip,…
- 接口平台——自定义接口返回内容提高…
- 识别IE11
- 大数据时代:个人信息安全亟待保护
- linux 的一个调试命令 strace
- [译] 运行级别说明文档
- Windows sockets网络开发-IOCP模型
- poj_2187求凸包直径
- Centos 的一些配置 记下来 原来记得全忘了