#############Installing Time::HiRes#################### #下载 Time::HiRes 模块 注意:文件名字和连接可能会有变化 wget http://www.cpan.org/modules/by-module/Time/Time-HiRes-1.65.tar.gz tar -zxvf Time-HiRes-1.65.tar.gz cd Time-HiRes-1.65 perl Makefile.PL make #如果有错误信息的话表明你的环境变量有所不同,需要进行如下操作 export LC_ALL=C perl Makefile.PL make make install #安装 Time::HiRes 完毕 ##############Installing AWBot###################### wget http://awbot.sourceforge.net/files/awbot.tgz #解压缩 tar -zxvf awbot.tgz cd awbot-1.0/ #把配置文件模板复制一份: cp awbot.test.conf awbot.dbanotes.conf vi awbot.dbanotes.conf #进行基本配置: OUTPUTDIR = "./output" # 输出文件的位置(必须存在并可写) SERVER = "www.dbanotes.net" # 待测试的站点域名 #USER = "test" # 如果Web应用程序需要认证的话,在这里添入用户名字,并去掉注释 #PASSWORD = "test" # 如果Web应用程序需要认证的话,在这里添入用户密码,并去掉注释 rd that awbot will use BOTNAME = "AWBot" # String value to force bot name used in the user agent string DELAY = 0 # Delay beetween each HTTP request (-1 wait a key, 0 no delay, n number of seconds) MAXSIZE = 0 # Maximum size of HTTP response (0 = no limit) TIMEOUT = 120 # Timeout (when waiting for a server response after sending a request) LANG = "en" # 输出内容的语言
AWBot脚本还可以有很多参数选项,我们来看看参数:
# perl awbot.pl ----- awbot 1.0 (build 1.3) ----- Advanced Web Bot is a tool to test a web server. Usage: awbot.pl -config=testconfigfile [options]
Where options are: -server=xxx Overwrite SERVER value of testconfig file. -user=xxx Overwrite USER value of testconfig file. -password=xxx Overwrite PASSWORD value of testconfig file. -delay=n Overwrite DELAY value of testconfig file. -timeout=n Overwrite TIMEOUT value of testconfig file. -loadimages Load image files. -nostopiferror Awbot continues with next test when an error occurs. -prepareonly Only execute pre-actions. -executeonly Do not execute any pre-actions nor post-actions. -id Output file name contains process ID number. -verbose Output file is also reported on std output (screen). -silent Nothing on std output (screen). -debug=X To add debug informations lesser than level X
Now supports/detects: Several predefined post-test or pre-test actions (Scripts, SQL request...) Web sites with Basic HTTP/Proxy authentication Easy to configure (one config file) Configuration and Test plan can be defined dynamically (using variables catched from a previous test) Possible use of several simultanous sessions (with awbotlaunch.pl)
回首页 All Articles (by Fenng) are licensed under a Creative Commons License. I would welcome any feedback. Please send questions, comments or corrections to dbanotes@gmail.com