mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add tool to make stress tests
This commit is contained in:
parent
89f32bf46e
commit
cd5f2b8239
7
test/awbot/README
Normal file
7
test/awbot/README
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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
|
||||
|
||||
139
test/awbot/awbot.test.conf
Normal file
139
test/awbot/awbot.test.conf
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
# 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>
|
||||
3
test/awbot/output/README
Normal file
3
test/awbot/output/README
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
README (English)
|
||||
--------------------------------
|
||||
This directory contains files output of stress tests using AWBot.
|
||||
Loading…
Reference in New Issue
Block a user