51Testing软件测试论坛

标题: 用VU录制的脚本 [打印本页]

作者: 雨加雪    时间: 2008-7-4 09:50
标题: 用VU录制的脚本
下面我 刚用VU录制的 脚本  ,  可是 连这个 我都看不太懂  ,还怎么 继续啊   ,求助 ,跪谢,  看哪方面的书 或者从哪入手

        lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=192.168.2.50:40000", LrsLastArg);

        lrs_send("socket0", "buf0", LrsLastArg);

        lrs_receive("socket0", "buf1", LrsLastArg);

        lrs_send("socket0", "buf2", LrsLastArg);

        lrs_receive("socket0", "buf3", LrsLastArg);

        lrs_send("socket0", "buf4", LrsLastArg);

        lrs_receive("socket0", "buf5", LrsLastArg);

        lrs_send("socket0", "buf6", LrsLastArg);

        lrs_receive("socket0", "buf7", LrsLastArg);

        lrs_send("socket0", "buf8", LrsLastArg);

        lrs_receive("socket0", "buf9", LrsLastArg);

        lrs_send("socket0", "buf10", LrsLastArg);

        lrs_receive("socket0", "buf11", LrsLastArg);

        lrs_send("socket0", "buf12", LrsLastArg);

        lrs_receive("socket0", "buf13", LrsLastArg);

        lrs_send("socket0", "buf14", LrsLastArg);

        lrs_receive("socket0", "buf15", LrsLastArg);

        lrs_send("socket0", "buf16", LrsLastArg);

        lrs_receive("socket0", "buf17", LrsLastArg);

        lrs_send("socket0", "buf18", LrsLastArg);

        lrs_receive("socket0", "buf19", LrsLastArg);

        lrs_send("socket0", "buf20", LrsLastArg);

        lrs_receive("socket0", "buf21", LrsLastArg);

        lrs_send("socket0", "buf22", LrsLastArg);

        lrs_receive("socket0", "buf23", LrsLastArg);

        lrs_send("socket0", "buf24", LrsLastArg);

        lrs_receive("socket0", "buf25", LrsLastArg);

        lrs_send("socket0", "buf26", LrsLastArg);

        lrs_receive("socket0", "buf27", LrsLastArg);

        lrs_send("socket0", "buf28", LrsLastArg);

        lrs_receive("socket0", "buf29", LrsLastArg);

        lrs_send("socket0", "buf30", LrsLastArg);

        lrs_receive("socket0", "buf31", LrsLastArg);

        lrs_send("socket0", "buf32", LrsLastArg);

        lrs_receive("socket0", "buf33", LrsLastArg);

        lrs_send("socket0", "buf34", LrsLastArg);

        lrs_receive("socket0", "buf35", LrsLastArg);

        lrs_send("socket0", "buf36", LrsLastArg);

        lrs_receive("socket0", "buf37", LrsLastArg);

        lr_think_time(11);

        lrs_send("socket0", "buf38", LrsLastArg);

        lrs_receive("socket0", "buf39", LrsLastArg);

        lr_think_time(15);

        lrs_send("socket0", "buf40", LrsLastArg);

        lrs_receive("socket0", "buf41", LrsLastArg);

        lrs_send("socket0", "buf42", LrsLastArg);

        lrs_receive("socket0", "buf43", LrsLastArg);

        lrs_send("socket0", "buf44", LrsLastArg);

        lrs_receive("socket0", "buf45", LrsLastArg);

        lr_think_time(6);

        lrs_send("socket0", "buf46", LrsLastArg);

        lrs_receive("socket0", "buf47", LrsLastArg);

        lrs_send("socket0", "buf48", LrsLastArg);

        lrs_receive("socket0", "buf49", LrsLastArg);

        lr_think_time(9);

        lrs_send("socket0", "buf50", LrsLastArg);

        lrs_receive("socket0", "buf51", LrsLastArg);

        lrs_send("socket0", "buf52", LrsLastArg);

        lrs_receive("socket0", "buf53", LrsLastArg);

        lr_think_time(6);

        lrs_send("socket0", "buf54", LrsLastArg);

        lrs_receive("socket0", "buf55", LrsLastArg);

        lr_think_time(9);

        lrs_send("socket0", "buf56", LrsLastArg);

        lrs_receive("socket0", "buf57", LrsLastArg);

        lrs_send("socket0", "buf58", LrsLastArg);

        lrs_receive("socket0", "buf59", LrsLastArg);

        lr_think_time(4);

        lrs_send("socket0", "buf60", LrsLastArg);

        lrs_receive("socket0", "buf61", LrsLastArg);

        lrs_send("socket0", "buf62", LrsLastArg);

        lrs_receive("socket0", "buf63", LrsLastArg);

        lr_think_time(13);

        lrs_send("socket0", "buf64", LrsLastArg);

        lrs_receive("socket0", "buf65", LrsLastArg);

        lr_start_transaction("qiehuan301");

        lr_think_time(8);

        lrs_send("socket0", "buf66", LrsLastArg);

        lrs_receive("socket0", "buf67", LrsLastArg);

        lrs_send("socket0", "buf68", LrsLastArg);

        lrs_receive("socket0", "buf69", LrsLastArg);

        lr_end_transaction("qiehuan301",LR_AUTO);

        lr_think_time(19);

        lrs_send("socket0", "buf70", LrsLastArg);

        lrs_receive("socket0", "buf71", LrsLastArg);

        return 0;
}
作者: 小蜻蜓    时间: 2008-7-4 10:31
这是用什么协议录制的脚本阿,没有见过呢!!
作者: zibeike    时间: 2008-7-4 10:42
winsocket协议录制的,建议有更高层的协议的话,最好选择高层协议。
对于winsocket协议,包含的基本就是这些函数,是socket的一些操作。socket的包含的内容在data文件中。使用一个软件,最直接的参考书就是它的帮助了,里面讲的非常全。




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