|
4#
楼主 |
发表于 2009-5-27 09:44:49
|
只看该作者
又出问题了!急!
现在好了! 又出现新的问题了!
现在登录程序做了修改,将登录用户和服务器做了绑定。将客户端的登录用户session保存到内存中,服务器验证。
我脚本录制都是好的,但是回放时报错:Error: System.Runtime.Remoting.RemotingException: 调度消息时出错。(运行到event 5就报错)
这个错应该是客户端报的错误信息,但是我录制的时候都是正确的啊!我就困惑了,这到底是程序的问题还是脚本的问题呢?望高手帮我解决下,谢谢了!
代码:
namespace Script {
using JZT.GOS.Modal.Login.Entity;
using JZT.GOS.Modal.Login.Interface;
using JZT.GOS.Modal.SaleOrder.Interface;
using LoadRunner;
using Mercury.LoadRunner.DotNetProtocol.Replay;
using System;
using System.Data;
public partial class VuserClass {
public virtual int Action() {
String filename_1;
filename_1 = "E:\\SC\\05编码\\Release\\客户端\\GOS.Client.exe.config";
lr.log("Event 1: LrReplayUtils.ConfigureRemoting(filename_1);");
LrReplayUtils.ConfigureRemoting(filename_1);
lr.think_time(14);
lr.log("Event 2: ((ILogin)(Activator.GetObject(typeof(JZT.GOS.Modal.Login.Interface.ILogi" +
"n), \"tcp://127.0.0.1:8541/LoginService\")));");
ILogin_1 = ((ILogin)(Activator.GetObject(typeof(JZT.GOS.Modal.Login.Interface.ILogin), "tcp://127.0.0.1:8541/LoginService")));
inof_1 = ((LoginInfo)(LrReplayUtils.GetSerializedObject("Serialization_1.bin")));
lr.log("Event 3: ILogin_1.OnLogin(inof_1);");
lr.think_time(8);
String url_1;
url_1 = "tcp://127.0.0.1:8541/CustomerService";
lr.log("Event 4: ((ICustomerService)(Activator.GetObject(typeof(JZT.GOS.Modal.SaleOrder.I" +
"nterface.ICustomerService), url_1)));");
ICustomerService_1 = ((ICustomerService)(Activator.GetObject(typeof(JZT.GOS.Modal.SaleOrder.Interface.ICustomerService), url_1)));
lr.log("Event 5: ICustomerService_1.GetCustomersByAbbr(string.Empty);");
DataSet_1 = ICustomerService_1.GetCustomersByAbbr(string.Empty);
lr.log("Event 6: DataSet_1.Tables;");
DataTableCollection_1 = DataSet_1.Tables;
lr.log("Event 7: DataTableCollection_1[\"Table\"];");
DataTable_1 = DataTableCollection_1["Table"];
DATASET_XML(1); |
|