This item will discuss more about protocols about performance testing (LoadRunner as intance).We all know that protocols are cores of this type of testing. Before running one specific loading testing or PT(performance testing),the testers should familiar with UAT's related protocols very much.If not , it is a waste of time for testers.
To loadrunner , I love it very much, and it is very popular in this time market.Now i will describle one type of protocol:winSoket. As we know, Web(HTTP) , most of us all know about it. I will ignore it here.
first , i will record a win app( Youdao Dic). And the below is one script which just run the app installed in local computer.
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Sun Jan 19 18:33:58
*********************************************************************/
#include "lrs.h"
Action()
{
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=61.135.218.25:80", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
return 0;
}
in Action function.
line 3: lrs_create_socket is to initilize the winsoket protocol, and to create a connection which can get an road from client to server in specific ports.As the detail of the above. it created an connection from local computer 0 port to IP(61.135.218.25) and its port is 80. Communication type is 'TCP'.
line 4 : lrs_send :
Sends data on a datagram or a stream socket.
line 5: lrs_receive :
Receives data from a datagram or stream socket
the above script is very simple and make sense about launch an app about Youdao. So like this, we can using other protocols to make performance testing in many kinds of.