51Testing软件测试论坛

标题: 新手接口测试请教 [打印本页]

作者: wenqiang1990    时间: 2014-11-19 16:57
标题: 新手接口测试请教
要求用loadrunner对wcf服务的接口进行压测,给了一个http://dmspi.test.com/CloudBillService.svc 接口地址地址 按照web services 协议录制不知道为什么不可以啊 脚本和日志如下 ,不知道Action.c(5): Error Exceptions: 是个什么错误?

Action()
{


    web_service_call( "StepName=GetDeliveryDescript_102",
        "SOAPMethod=BillService|WSHttpBinding_IBillService|GetDeliveryDescript",
        "ResponseParam=response",
        "Service=BillService",
        "ExpectedResponse=SoapResult",
        "Snapshot=t1416377302.inf",
        BEGIN_ARGUMENTS,
        "waybillNo=11410220000002",
        "waybillNoSpecified=",
        END_ARGUMENTS,
        BEGIN_RESULT,
        "GetDeliveryDescriptResult/WaybillNo=Param_WaybillNo",
        END_RESULT,
        LAST);


    return 0;
}

日志如下

Run-Time Settings file: "C:\Users\wenqiang\AppData\Local\Temp\noname1\\default.cfg"
Vuser directory: "C:\Users\wenqiang\AppData\Local\Temp\noname1"
Vuser output directory: "C:\Users\wenqiang\AppData\Local\Temp\noname1\"
LOCAL start date/time:  2014-11-19 14:29:00
vuser_init.c(12): web_add_cookie was successful      [MsgId: MMSG-26392]
vuser_init.c(14): web_add_cookie was successful      [MsgId: MMSG-26392]
vuser_init.c(16): Redirecting "http://dps.wltest.com/" (redirection depth is 0)      [MsgId: MMSG-26694]
vuser_init.c(16): To location "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26693]
vuser_init.c(16): Found resource "http://dps.wltest.com/Content/page_frame.css?20141119" in HTML "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://dps.wltest.com/Scripts/lib/jquery-1.7.1.min.js" in HTML "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://dps.wltest.com/Scripts/references/jquery.validate.min.js" in HTML "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://dps.wltest.com/Scripts/references/jquery.validate.unobtrusive.min.js" in HTML "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26659]
vuser_init.c(16): Found resource "http://dps.wltest.com/Home/GenerateVerificationCode" in HTML "http://dps.wltest.com/Home/Login?ReturnUrl=%2f"      [MsgId: MMSG-26659]
vuser_init.c(16): Downloading resource "http://dps.wltest.com/Content/images/background/login_bg_new.jpg" (specified by argument number 9)      [MsgId: MMSG-26577]
vuser_init.c(16): Downloading resource "http://dps.wltest.com/Content/images/background/login_btn.jpg" (specified by argument number 12)      [MsgId: MMSG-26577]
vuser_init.c(16): Downloading resource "http://dps.wltest.com/Content/images/background/login_input_bg.jpg" (specified by argument number 15)      [MsgId: MMSG-26577]
vuser_init.c(16): Downloading resource "http://dps.wltest.com/Home/CheckVerificationCode?VerificationCode=qqqq" (specified by argument number 18)      [MsgId: MMSG-26577]
vuser_init.c(16): web_url("dps.wltest.com") was successful, 408598 body bytes, 2979 header bytes      [MsgId: MMSG-26386]
vuser_init.c(30): web_add_cookie was successful      [MsgId: MMSG-26392]
vuser_init.c(32): Submitting form to "http://dps.wltest.com/Home/Login?ReturnUrl=%2f", Target Frame=""      [MsgId: MMSG-27978]
vuser_init.c(32): Redirecting "http://dps.wltest.com/Home/Login?ReturnUrl=%2f" (redirection depth is 0)      [MsgId: MMSG-26694]
vuser_init.c(32): To location "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26693]
vuser_init.c(32): Found resource "http://dps.wltest.com/content/StylesNew/frame.css" in HTML "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/Scripts/plugins/ymPrompt/skin/simple_gray/ymPrompt.css" in HTML "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/Scripts/lib/jquery-1.7.1.min.js" in HTML "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/Scripts/plugins/ymPrompt/ymPrompt.min.js" in HTML "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26659]
vuser_init.c(32): Detected non-resource "http://dps.wltest.com/Frame/Main" in "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26574]
vuser_init.c(32): Found resource "http://dps.wltest.com/content/ScriptsNew/frame.js" in HTML "http://dps.wltest.com/Home/Index"      [MsgId: MMSG-26659]
vuser_init.c(32): Detected non-resource "http://dps.wltest.com/Frame/Menu" in "http://dps.wltest.com/Frame/Main"      [MsgId: MMSG-26574]
vuser_init.c(32): Detected non-resource "http://dps.wltest.com/Frame/LeftLine" in "http://dps.wltest.com/Frame/Main"      [MsgId: MMSG-26574]
vuser_init.c(32): Detected non-resource "http://dps.wltest.com/Frame/TopLine" in "http://dps.wltest.com/Frame/Main"      [MsgId: MMSG-26574]
vuser_init.c(32): Detected non-resource "http://dps.wltest.com/Frame/TabPage" in "http://dps.wltest.com/Frame/Main"      [MsgId: MMSG-26574]
vuser_init.c(32): Found resource "http://dps.wltest.com/content/ScriptsNew/Images/switch_1.gif" in HTML "http://dps.wltest.com/Frame/LeftLine"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/content/ScriptsNew/Navigation.js" in HTML "http://dps.wltest.com/Frame/LeftLine"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/Scripts/base.js" in HTML "http://dps.wltest.com/Frame/TabPage"      [MsgId: MMSG-26659]
vuser_init.c(32): Found resource "http://dps.wltest.com/Scripts/import/container.js" in HTML "http://dps.wltest.com/Frame/TabPage"      [MsgId: MMSG-26659]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/plugins/tab/jquery.tab.js" (specified by argument number 17)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/plugins/tab/jquery-tab.css" (specified by argument number 20)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://tongji.wuliusys.com/Scripts/Menu/RFD_Statistics.js" (specified by argument number 23)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/imgs/tab2.gif" (specified by argument number 32)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/imgs/tab1.gif" (specified by argument number 35)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/imgs/close.gif" (specified by argument number 38)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/Scripts/imgs/tab3.gif" (specified by argument number 41)      [MsgId: MMSG-26577]
vuser_init.c(32): Found resource "http://dps.wltest.com/content/ScriptsNew/Root.TreeView.js?v=20120911" in HTML "http://dps.wltest.com/Frame/Menu"      [MsgId: MMSG-26659]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/content/ScriptsNew/images/vista/burl_0a.gif" (specified by argument number 26)      [MsgId: MMSG-26577]
vuser_init.c(32): Downloading resource "http://dps.wltest.com/content/ScriptsNew/Images/vista/gif/folder.gif" (specified by argument number 29)      [MsgId: MMSG-26577]
vuser_init.c(32): web_submit_form("Login") was successful, 165208 body bytes, 11717 header bytes      [MsgId: MMSG-26386]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Web service call "GetDeliveryDescript_102" started
Action.c(5): Error Exceptions:

作者: 放任无奈    时间: 2014-11-20 10:44
首先确认一下使用的loadrunner版本是否支持WCF协议吧
能录下来不一定就是正确的

另外提供一个最简单的方法
让开发提供个测试页面 所有需要参数化输入的数据做成表单提交
这样用LR压力测试该页面即可
(不过需要注意验证web服务器的性能不能成为瓶颈)
作者: 土土的豆豆    时间: 2014-11-20 11:03
这个错误一般是数组大小设置不够导致的   试试把数组设置长点试试看呢?
不过我个人建议你用SoapUI测接口,绝对比LR好用多了~
作者: wenqiang1990    时间: 2014-11-20 15:22
版本是loadrunner11, 用soapUI测 也提示错误说是 “AddressFilter 在 EndpointDispatcher 不匹配,To 为“”的消息无法在接收方处理。请检查发送方和接收方的 EndpointAddresses 是否一致”。
作者: wenqiang1990    时间: 2014-11-20 15:24
土土的豆豆 发表于 2014-11-20 11:03
这个错误一般是数组大小设置不够导致的   试试把数组设置长点试试看呢?
不过我个人建议你用SoapUI测接口 ...

如何把数组设置长,新手不知道数组在哪里
作者: 土土的豆豆    时间: 2014-11-22 09:18
wenqiang1990 发表于 2014-11-20 15:24
如何把数组设置长,新手不知道数组在哪里

我指你接口里参数的对象是否用数组取的?LR11和SoapUI都一样错误信息,可能是接口方法中本事有点问题?尝试和开发沟通下,是否是原接口部分有点异样?我随便建议的 不一定正确哈~~等他人一起帮忙解答……
作者: liaoxj    时间: 2014-11-24 10:59
先把soapUI调通吧!
作者: wenqiang1990    时间: 2014-11-24 14:04
liaoxj 发表于 2014-11-24 10:59
先把soapUI调通吧!

soapUI的错误 一点头绪也没有,说是地址不一致,不知道是那里的问题啊,




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2