Skip to content
Snippets Groups Projects
Commit cd5f2b82 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add tool to make stress tests

parent 89f32bf4
No related branches found
No related tags found
No related merge requests found
README (English)
--------------------------------
This directory contains files for stress tests using AWBot.
To run them:
'/home/ldestailleur/git/awbot/bin/awbotlaunch.pl' -config=awbot.test.conf -nbsessions=1
# AWBot 1.0 Config file
#-----------------------------------------------------------------------------
# Note that everywhere in the file you can include :
# __MONENV__ to ask AWBot to replace tag by value of environment variable MONENV
# $MYVAR to ask AWBot to replace tag by value of variable already defined
# in this same config file.
# $STARTSESSION is defined to 1 if AWbot is ran as a standalone process,
# defined to first session number if ran from AWBotlaunch.
# $NUMSESSION is defined to 1 if AWbot is ran as a standalone process,
# defined to session number if ran from AWBotlaunch.
# $NBSESSION is defined to 1 if AWbot is ran as a standalone process,
# defined to total number of sessions if ran from AWBotlaunch.
# You can also include perl code in values everywhere in the file.
#-----------------------------------------------------------------------------
# INIT PARAMETERS SECTION
#-----------------------------------------------------------------------------
# Put here all global parameters of your test configuration.
#
# Examples:
# OUTPUTDIR="/myoutputdir"
#-----------------------------------------------------------------------------
OUTPUTDIR = "./output" # Directory where to store result output file(s)
SERVER = "localhostdolibarr" # Domain name of main server to test (www.mysite.com)
#SERVER = "15.126.208.32"
#USER = "test" # If your web application require a Basic authentication, this is the login that awbot will use for this test session
#PASSWORD = "test" # If your web application require a Basic authentication, this is the password that awbot will use for this test session
#PROXYSERVER = "http://my.proxy.server:port/" # If the web application to test is after a proxy
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" # Choose output language
# DATABASE PARAMETERS SECTION
#-----------------------------------------------------------------------------
# This section is required only if you added SQL requests in your ACTIONS section (see later)
#
# Examples:
# BASEENGINE="mysql"
# USERBASE=($USER eq "toto"?"titi":$USER)
#-----------------------------------------------------------------------------
#BASEENGINE = "Oracle" # Here is the name of the perl DBD driver (mysql, ODBC, Oracle, Sybase...)
#DSN = "mybase" # Database name
#USERBASE = "myuser" # Database login
#PASSWORDBASE = "mypassword" # Database password
# OTHER PARAMETERS SECTION
#-----------------------------------------------------------------------------
# You can add here as many parameters as you need for rest of config file.
# Just use the following syntax (where n is a number between 1 and 99):
# PARAMn=value
# PARAMn="SELECT SQL request"
#
# Examples:
# PARAM1="select id from employee where name='$USER'"
# PARAM2=2000+$PARAM1
#-----------------------------------------------------------------------------
PARAM1 = 1
# LIST OF ACTIONS TO EXECUTE BEFORE A TEST
#-----------------------------------------------------------------------------
# You can use one of the keyword:
# SEQUENCE To set a database sequence to a value (see examples, for Oracle only)
# SQL To delete/insert some records in the database (see examples)
# SCRIPT To launch an external script
#
# Examples:
# SEQUENCE "myseq" $PARAM3+1
# SQL "delete from customers where id_customers < ".($PARAM1+$PARAM2)
# SCRIPT "myscript.exe"
#-----------------------------------------------------------------------------
<PRE ACTIONS>
</PRE ACTIONS>
# LIST OF ORDERED URLS TO TEST
#-----------------------------------------------------------------------------
# Use the following format:
# GET To get an HTML page (using GET HTTP method, like HTML links)
# POST To get an HTML page (using POST HTTP method, like HTML forms)
# CHECKYES To check if string is found in last response (using POSIX regex)
# CHECKNO To check if a string is not found in last response (using POSIX regex)
# VAR To extract a parameter from last response (using POSIX regex)
# SEQUENCE To set a database sequence to a value (see examples, for Oracle only)
# SQL To delete/insert some records in the database (see examples)
# SCRIPT To launch an external script
# WRITETO Write last html response to a file
# WRITETOH Write last html response with its HTTP header to a file (full response)
# AUTO To make a GET on all URLs find in last HTML response page and follow
# links on n level
# DELAY To change the wait delay used after requests on URLs
#
#
# Examples:
# GET "http://$SERVER/mypage.html?x=y&v=w"
# POST "http://$SERVER/mypage.html?x=y&v=w"
# CHECKYES "xxx"
# CHECKNO "eee"
# VAR "VARNAME:idvar=(\d)"
# SEQUENCE "myseq" $PARAM3+1
# SQL "delete from customers"
# SCRIPT "myscript.exe"
# WRITETO "myfile.html"
# WRITETOH "myfile.http"
# AUTO 1
# DELAY 2
#-----------------------------------------------------------------------------
<ACTIONS>
GET "http://$SERVER/dolibarr_new/user/logout.php"
CHECKYES "loginfunction"
POST "http://$SERVER/dolibarr_new/index.php?username=admin&password=bad"
CHECKYES "Bad value for login or password"
POST "http://$SERVER/dolibarr_new/index.php?username=admin&password=admin"
CHECKYES "Dolibarr - Home area"
GET "http://$SERVER/dolibarr_new/societe/index.php?mainmenu=companies&leftmenu="
CHECKYES "Third parties area"
GET "http://$SERVER/dolibarr_new/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools"
</ACTIONS>
# LIST OF ACTIONS TO EXECUTE AFTER A TEST
#-----------------------------------------------------------------------------
# You can use same rules for LIST OF ACTIONS TO EXECUTE BEFORE A TEST.
#-----------------------------------------------------------------------------
<POST ACTIONS>
</POST ACTIONS>
README (English)
--------------------------------
This directory contains files output of stress tests using AWBot.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment