51Testing软件测试论坛

标题: 安全测试 [打印本页]

作者: hufang375    时间: 2009-4-27 16:15
标题: 安全测试
有谁知道一些安全测试的方法,可以交流一下不?
作者: hufang375    时间: 2009-8-7 14:34
标题: 关于loadrunner 脚本的修改
脚本是用LR做B/S系统的性能测试
#include "web_api.h"


Action()
{
        web_add_cookie("DvForum=username=jU2PfwyohI8=; DOMAIN=mncg.788111.com");

        web_add_cookie("__utma=249827418.4045048687669949400.1249543856.1249622971.1249623614.16; DOMAIN=mncg.788111.com");

        web_add_cookie("__utmz=249827418.1249543856.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=mncg.788111.com");

        web_add_cookie("__utmb=249827418.1.10.1249623614; DOMAIN=mncg.788111.com");

        web_url("index.html",
                "URL=http://mncg.788111.com/2009/index.html",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=../images/main_bg.jpg", ENDITEM,
                "Url=../images/logo.jpg", ENDITEM,
                "Url=../images/icon_login.gif", ENDITEM,
                "Url=../images/icon_star.gif", ENDITEM,
                "Url=../images/nav_bg.jpg", ENDITEM,
                "Url=../images/nav_right.jpg", ENDITEM,
                "Url=../images/nav_left.jpg", ENDITEM,
                "Url=../images/frame_t_bg.jpg", ENDITEM,
                "Url=../images/frame_b_bg.jpg", ENDITEM,
                "Url=../images/dot_line.jpg", ENDITEM,
                "Url=../images/icon_king1.gif", ENDITEM,
                "Url=../images/icon_king2.gif", ENDITEM,
                "Url=http://www.google-analytics.com/ga.js", ENDITEM,
                "Url=images/main_bg.jpg", "Referer=http://mncg.788111.com/2009/login.aspx", ENDITEM,
                "Url=images/frame_t_bg.jpg", "Referer=http://mncg.788111.com/2009/login.aspx", ENDITEM,
                "Url=images/frame_b_bg.jpg", "Referer=http://mncg.788111.com/2009/login.aspx", ENDITEM,
                "Url=images/icon_lock.jpg", "Referer=http://mncg.788111.com/2009/login.aspx", ENDITEM,
                LAST);

        web_submit_data("login.aspx_2",
                "Action=http://mncg.788111.com/2009/login.aspx",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://mncg.788111.com/2009/login.aspx",
                "Snapshot=t3.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=__EVENTTARGET", "Value=", ENDITEM,
                "Name=__EVENTARGUMENT", "Value=", ENDITEM,
                "Name=__VIEWSTATE", "Value=/wEPDwUJMTQ3MjU2MTIxD2QWAgIBD2QWBAIBDxYCHgdWaXNpYmxlZ2QCAw8WAh8AaGRkOSOZqAcstYgWw2qVQxcHboF03EI=", ENDITEM,
                "Name=txt_username", "Value=澶у", ENDITEM,
                "Name=txt_userpass", "Value=123456", ENDITEM,
                "Name=ddlBP", "Value=鏉窞甯?" ENDITEM                "Name=Button1", "Value= 鐧?褰?", ENDITEM,
                "Name=__EVENTVALIDATION", "Value=/wEWEAL9tPSKDAK3u5vhBALH/ISaCgK3hbWnBQLTvOWuBALbp92KBQL7l7WnBQKel7WnBQKX9t2KBQLjqfCbBQKy27OnBQKlz6eyBQKErLWnBQLH19ysBAKm7NmxBgKM54rGBnAZ5b4526yab7my5/s0ZTnmwcw0", ENDITEM,
                EXTRARES,
                "Url=images/main_bg.jpg", ENDITEM,
                "Url=images/frame_t_bg.jpg", ENDITEM,
                "Url=images/frame_b_bg.jpg", ENDITEM,
                "Url=images/icon_lock.jpg", ENDITEM,
                LAST);
        
        web_link("涓汉宸ヤ綔瀹?,
        "Text=涓汉宸ヤ綔瀹?,
                "Snapshot=t4.inf",

                EXTRARES ,
                "Url=images/main_bg.jpg", ENDITEM,
                "Url=images/left_menu_bg.jpg", ENDITEM,
                "Url=images/left_menu_top.jpg", ENDITEM,
                "Url=images/left_menu.jpg", ENDITEM,
                "Url=images/left_menu_hover_bg.gif", ENDITEM,
                "Url=images/dot_line.gif", ENDITEM,
                "Url=images/main_content_title.jpg", ENDITEM,
                "Url=images/icon_login.gif", ENDITEM,
                "Url=images/icon_star.gif", ENDITEM,
                "Url=images/logo.jpg", ENDITEM,
                "Url=images/icon_arrow.gif", ENDITEM,
                "Url=images/icon_arrow_hover.gif", ENDITEM,
                "Url=images/main_content_top.jpg", ENDITEM,
                "Url=images/main_content_bottom.jpg", ENDITEM,
                "Url=http://www.google-analytics.com/ga.js ", ENDITEM,
                "Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3.1&utmn=58556331&utmhn=mncg.788111.com&utmcs=utf-8&utmsr=1280x960&utmsc=16-bit&utmul=zh-cn&utmje=1&utmfl=-&utmdt=%E6%A8%A1%E6%8B%9F%E7%82%92%E8%82%A1--%E4%B8%AA%E4%BA%BA%E4%BB%93%E5%BA%93&utmhid=2015050309&utmr=0&utmp=/2009/userstockInfo.aspx&utmac=UA-4828336-1&utmcc=__utma%3D249827418.4045048687669949400.1249543856.1249623614.1249624039.17%3B%2B__utmz%3D249827418.1249543856.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", ENDITEM,
                LAST);

        return 0;
}

出错提示是:
Action.c (63): missing "
Action.c (63): missing "
Action.c (67): undeclared identifier `EXTRARES'
Action.c (68): undeclared identifier `ENDITEM'
Action.c (82): missing "
c:\\documents and settings\\hufang\\local settings\\temp\\noname8\\\\combined_noname8.c (4): 5 errors, not writing pre_cci.ci
作者: hufang375    时间: 2009-8-7 14:34
应该怎么改呢




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