AWBot 是一款易用的测试Web站点的小工具。站点在http://awbot.sourceforge.net 。该项目是 AWstats 项目的辅助项目。 AWbot 的功能简单的说,可以模拟用户访问站点的行为,测试站点的响应度和负载压力,并可进行基准测试。
具体来讲,AWbot 具有如下特性:
AWBot要求系统必须满足如下要求:
以下是一份Linux系统上安装操作的Log:
#############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应用程序需要认证的话,在这里添入用户密码,并去掉注释 ...... 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)
参数的解释比较详细,要不怎么说AWBot是个简单易用的工具呢。
# perl awbot.pl -config=awbot.dbanotes.conf -verbose TEST awbot 1.0 (build 1.3) --------------------------- Config file: awbot.dbanotes.conf Server: www.dbanotes.net - User: - Delay: 0 Botname: AWBot - TimeOut: 120 - MaxSize: 0 Date: 2004-10-13 13:13:15 Process ID: 21139 PRE ACTIONS --------------------------- ACTIONS --------------------------- 2004/10/13-13:13:15:534 URL 1 - http://www.dbanotes.net/ ---> OK - 2771.027 ms POST ACTIONS --------------------------- SUMMARY --------------------------- Total requests to do: 1 Total requests sent: 1 (1 answered) Total requests duration: 2771.027 ms Average requests response time: 2771 ms/request Total Check Yes: 0/0 No: 0/0 Faster request response time: URL 1 - 2771 ms Slower request response time: URL 1 - 2771 ms URL 1 - Duration: 2771 ms - Cumul: 2771 ms - Check Yes: 0 / 0 No: 0 / 0
AWbot - http://awbot.sourceforge.net
AWBot's Doc - http://awbot.sourceforge.net/docs/
若SourceForge不可访问,可在本站浏览联机文档: http://www.dbanotes.net/awbot/awbot.sourceforge.net/docs/index.html