51Testing软件测试论坛

标题: LoadRunner脚本中添加清楚本机缓存的语句是什么? [打印本页]

作者: xx033138    时间: 2009-10-22 20:29
标题: LoadRunner脚本中添加清楚本机缓存的语句是什么?
请问LoadRunner专家视图中怎么样添加清除本机缓存cookies的语句呢?
目的是执行一遍脚本后,清除掉前面操作在网页上的记录。
知道的大侠请吼起来,谢谢!
作者: aman_cao    时间: 2009-10-23 10:13
web_cleanup_cookies
web_remove_cookie
作者: xx033138    时间: 2009-10-23 14:06
谢谢大侠
作者: caiw0418    时间: 2010-11-22 18:02
回复 2# aman_cao


    Action()
{

        web_url("Templet.aspx",
                "URL=http://ww2.123.com:9999/Templet.aspx?lang=zh-cn&codepage=gb2312&rnd=261484.3569347316&",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                LAST);

        web_url("GetData.aspx",
                "URL=http://ww2.123.com:9999/GetData.aspx?action=5&id=20fc7224075b482aaeb892f3fdb9aef5&lang=zh-cn&rnd=171917.48903901887&",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t4.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/js/main.js?", "Referer=", ENDITEM,
                "Url=/css/main.css", "Referer=", ENDITEM,
                "Url=/Skins/green/main.css", "Referer=", ENDITEM,
                "Url=/Skins/green/invite.css", "Referer=", ENDITEM,
                "Url=/images/icon/offline_C_zh-cn.gif", "Referer=", ENDITEM,
                "Url=/images/icon/online_C_zh-cn.gif", "Referer=", ENDITEM,
                LAST);

        web_url("GetData.aspx_2",
                "URL=http://ww2.123.com:9999/GetData.aspx?action=6&id=20fc7224075b482aaeb892f3fdb9aef5&lang=zh-cn&rnd=928654.5529175893&",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t5.inf",
                "Mode=HTML",
                LAST);

        web_url(
                "GetData.aspx_3",
                "URL=http://ww2.123.com:9999/GetData.aspx?action=5&id=20fc7224075b482aaeb892f3fdb9aef5&lang=zh-cn&rnd=733696.8285505341&",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t6.inf",
                "Mode=HTML",
                LAST);
      
                web_remove_cookie();        return 0;
}


是不是在后面加句就可以了?
作者: PrefTest    时间: 2010-11-22 18:14
回复  aman_cao


    Action()
{

        web_url("Templet.aspx",
                "URL=http://ww2.123.com:9999/Te ...
caiw0418 发表于 2010-11-22 18:02


一般是在前面加的
作者: caiw0418    时间: 2010-11-22 18:22
回复 5# PrefTest


    那这样能达到 每次保存在机子的 id=20fc7224075b482aaeb892f3fdb9aef5   变不同的随机值吗
我试过放在后面  在日志里看每个vuser的id没变

那lr_remove_cookie  要怎么用 ?  谢谢 在线等




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