LoadRunner's Virtual User generator provides the recording capabilities of the human script, which, for starters, dramatically reduces the threshold for scripting, LoadRunner provides two ways to record scripts: html_based Script and url-based script, beginners wonder what is the difference between these two ways? Let's do a simple analysis here.
Here we have two ways to record the Baidu home page, compare them between what is different.
HTML-style script:
Action () {Web_url ("www.baidu.com", "url=http://www.baidu.com/", "resource=0", "Recco Ntenttype=text/html "," referer= "," Snapshot=t3.inf "," mode=html ", Extrares," Url=http://s1.bdstatic.com/r/www/img/i-1.0.0.png ", Enditem," Url=http://s1.bdstatic.com/r/www/img/bg-1.0.0.gif ", Enditem, "Url=/favicon.ico", "referer=", Enditem, "Url=http://suggestion.baidu.com/su?wd=&cb=window . bdsug.sugprerequest&sid=1440_2031_1945_1788&t=1362056239875 ", Enditem," url=http://suggestion.baidu.com /su?wd=%e8%99%ab%e5%b8%88&p=3&cb=window.bdsug.sug&sid=1440_2031_1945_1788&t=1362056247256 ", Enditem, "url=http://suggestion.baidu.com/su?wd=%e8%99%ab%e5%b8%88%20&p=3&cb=window.bdsug.sug&sid= 1440_2031_1945_1788&t=1362056247969 ", Enditem," url=http://suggestion.baidu.com/su?wd=%e8%99%ab%e5%b8%88%20% E5%8d%9a%e5%ae%a2%e5%9b%ad&p=3&cb=window.bdsug.sug&sid=1440_2031_1945_1788&t=1362056251016 ", Enditem, last);
return 0; }
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/
URL-Way Script:
Action () {Web_url ("www.baidu.com", "url=http://www.baidu.com/", "resource=0", "Recco
Ntenttype=text/html "," referer= "," Snapshot=t67.inf "," Mode=http ", last);
Web_concurrent_start (NULL); Web_url ("Shouye_b5486898c692066bd2cbaeda86d74448.gif", "Url=http://www.baidu.com/img/shouye_ B5486898c692066bd2cbaeda86d74448.gif "," resource=1 "," Reccontenttype=image/gif "," Referer=http:
www.baidu.com/"," Snapshot=t68.inf ", last); Web_url ("Gs.gif", "Url=http://www.baidu.com/cache/global/img/gs.gif", "resource=1", "reccontent
Type=image/gif "," referer=http://www.baidu.com/"," Snapshot=t69.inf ", last);
Web_url ("Tangram-1.3.4c1.0.js", "Url=http://s1.bdstatic.com/r/www/cache/global/js/tangram-1.3.4c1.0.js"),
"Resource=1", "Reccontenttype=application/javascript", "referer=http://www.baidu.com/", "Snapshot=t71.inf", last);
Web_url ("Home-2.5.js", "Url=http://s1.bdstatic.com/r/www/cache/global/js/home-2.5.js", "Resource=1",
"Reccontenttype=application/javascript", "referer=http://www.baidu.com/", "Snapshot=t72.inf",
last);
Web_url ("U-1.3.4.js", "Url=http://s1.bdstatic.com/r/www/cache/user/js/u-1.3.4.js", "resource=1",
"Reccontenttype=application/javascript", "referer=http://www.baidu.com/", "Snapshot=t73.inf",
last);
Web_concurrent_end (NULL); Web_url ("I-1.0.0.png", "Url=http://s1.bdstatic.com/r/www/img/i-1.0.0.png", "resource=1", "RecCo
Ntenttype=image/png "," referer=http://www.baidu.com/"," Snapshot=t70.inf ", last);
Web_concurrent_start (NULL); Web_url ("su", "url=http://suggestion.baidu.com/su?wd=&cb=window.bdsug.sugprerequest&sid=1431_2031_1944_1788&t=1362056977341 "," resource=1 "," RecContentTy
Pe=baiduapp/json "," referer=http://www.baidu.com/"," Snapshot=t74.inf ", last); Web_url ("Favicon.ico", "Url=http://www.baidu.com/favicon.ico", "resource=1", "Reccontenttype=im
Age/x-icon "," referer= "," Snapshot=t75.inf ", last);
Web_concurrent_end (NULL);
return 0; }