Do the performance test engineers understand the code? The answer is a must. Many testers think it's hard to write a script in LoadRunner, mainly because most testers haven't done any development work, and the Program foundation of the university has forgotten almost. There are also non-computer professional testers, so the code Wangdu more daunting.
Many people think that LoadRunner only support C language (including I have always thought so), because the LoadRunner default script is C language, in fact it supports all the current mainstream language, such as: Java User, VB User, VB Script user, Javascript User, MMicrosoft. NET, there is always a suitable for you, the minimum C language is a compulsory course bar.
Attitudes to writing LoadRunner scripts
Now that you have a bike in front of you, you walk to work every day to show that you are physically fit. It takes me half an hour to ride a bike, and you walk for 2 hours, our purpose is the same, do you want to let people say you cow, or let people say you silly? Of course, the bicycle is not omnipotent, for example, the location of work in the mountains, bicycles and the book does not go, natural walking is the only choice.
So, for the LoadRunner script, the part that can be recorded is changed and the handwriting is not recorded, but only if we write the script.
Understanding LoadRunner Scripts
LoadRunner brought a small airplane booking system.
We start the start Web Server service, and if it succeeds, there will be a green x in the lower right corner of the desktop, and then open the browser access
Http://127.0.0.1:1080/WebTours/Below is our LoadRunner recording a login process.
Action ()
{
Web_url ("Webtours",
"url=http://127.0.0.1:1080/webtours/",
"resource=0"
, " Reccontenttype=text/html ","
referer= ",
" Snapshot=t1.inf ",
" mode=html ", last
);
Lr_rendezvous ("Rendezvous Point");
Lr_start_transaction ("Landing Time");
Web_submit_form ("login.pl",
"Snapshot=t2.inf",
ItemData,
"Name=username", "Value=test1", Enditem,
"Name=password", "value=123456", Enditem,
"name=login.x", "value=59", Enditem,
"NAME=LOGIN.Y", " Value=5 ", Enditem, last
);
Lr_end_sub_transaction ("Landing Time", lr_abort);
return 0;
}