|
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里运行的时候,事务通不过,也没有提示什么错误,请高手提点,谢谢!!! |
|