51Testing软件测试论坛

标题: 请求帮助,紧急!!! [打印本页]

作者: 胡启东    时间: 2011-8-17 16:25
标题: 请求帮助,紧急!!!
import lrapi.lr;

import lrapi.lr;
import cn.com.superv.common.protocol.socket.Client;
import cn.com.superv.common.protocol.socket.Connection;
import cn.com.superv.common.protocol.socket.protocol.SpvMessage;
import cn.com.superv.common.protocol.socket.protocol.SpvMessageUtility;
import cn.com.superv.mdd.ddc.socket.command.DDCCommandFactory;

public class Actions
{

    private  DDCCommandFactory cmdFactory=null;
    private Client client=null;
    private Connection conn;

        public int init() throws Throwable {
              cmdFactory = new DDCCommandFactory();
                 client = new Client(cmdFactory);
                client.connect("192.168.1.22", 8099);
                conn = client.getConnection();
                return 0;
        }//end of init

      
        public int action() throws Throwable {
          lr.start_transaction( "start" );
         
         

                SpvMessage msg = DDCCommandFactory.createSpmsReqMsg("18907891027", "460031007891027", "3", "4",
                                "5", "3", "0", "", "18907891025", "10", "11", "msc_002", 1001);

                byte[] tempBuf = msg.pack();
                conn.send(tempBuf, tempBuf.length);
                Thread.yield();
           lr.end_transaction ( "start",1);
               return 0;
      
        }//end of action

   

        public int end() throws Throwable {
                
                return 0;
        }//end of end
}




该脚本没有错误,但是在loadrunner里运行的时候,事务通不过,也没有提示什么错误,请高手提点,谢谢!!!
作者: 胡启东    时间: 2011-8-17 16:31
高手呢?快来帮忙啊!
作者: zhuruize    时间: 2011-8-19 14:01
在服务端也不打印异常吗?




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