awbot.test.conf 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # AWBot 1.0 Config file
  2. #-----------------------------------------------------------------------------
  3. # Note that everywhere in the file you can include :
  4. # __MONENV__ to ask AWBot to replace tag by value of environment variable MONENV
  5. # $MYVAR to ask AWBot to replace tag by value of variable already defined
  6. # in this same config file.
  7. # $STARTSESSION is defined to 1 if AWbot is ran as a standalone process,
  8. # defined to first session number if ran from AWBotlaunch.
  9. # $NUMSESSION is defined to 1 if AWbot is ran as a standalone process,
  10. # defined to session number if ran from AWBotlaunch.
  11. # $NBSESSION is defined to 1 if AWbot is ran as a standalone process,
  12. # defined to total number of sessions if ran from AWBotlaunch.
  13. # You can also include perl code in values everywhere in the file.
  14. #-----------------------------------------------------------------------------
  15. # INIT PARAMETERS SECTION
  16. #-----------------------------------------------------------------------------
  17. # Put here all global parameters of your test configuration.
  18. #
  19. # Examples:
  20. # OUTPUTDIR="/myoutputdir"
  21. #-----------------------------------------------------------------------------
  22. OUTPUTDIR = "./output" # Directory where to store result output file(s)
  23. SERVER = "localhostdolibarr" # Domain name of main server to test (www.mysite.com)
  24. #SERVER = "15.126.208.32"
  25. #USER = "test" # If your web application require a Basic authentication, this is the login that awbot will use for this test session
  26. #PASSWORD = "test" # If your web application require a Basic authentication, this is the password that awbot will use for this test session
  27. #PROXYSERVER = "http://my.proxy.server:port/" # If the web application to test is after a proxy
  28. BOTNAME = "AWBot" # String value to force bot name used in the user agent string
  29. DELAY = 0 # Delay beetween each HTTP request (-1 wait a key, 0 no delay, n number of seconds)
  30. MAXSIZE = 0 # Maximum size of HTTP response (0 = no limit)
  31. TIMEOUT = 120 # Timeout (when waiting for a server response after sending a request)
  32. LANG = "en" # Choose output language
  33. # DATABASE PARAMETERS SECTION
  34. #-----------------------------------------------------------------------------
  35. # This section is required only if you added SQL requests in your ACTIONS section (see later)
  36. #
  37. # Examples:
  38. # BASEENGINE="mysql"
  39. # USERBASE=($USER eq "toto"?"titi":$USER)
  40. #-----------------------------------------------------------------------------
  41. #BASEENGINE = "Oracle" # Here is the name of the perl DBD driver (mysql, ODBC, Oracle, Sybase...)
  42. #DSN = "mybase" # Database name
  43. #USERBASE = "myuser" # Database login
  44. #PASSWORDBASE = "mypassword" # Database password
  45. # OTHER PARAMETERS SECTION
  46. #-----------------------------------------------------------------------------
  47. # You can add here as many parameters as you need for rest of config file.
  48. # Just use the following syntax (where n is a number between 1 and 99):
  49. # PARAMn=value
  50. # PARAMn="SELECT SQL request"
  51. #
  52. # Examples:
  53. # PARAM1="select id from employee where name='$USER'"
  54. # PARAM2=2000+$PARAM1
  55. #-----------------------------------------------------------------------------
  56. PARAM1 = 1
  57. # LIST OF ACTIONS TO EXECUTE BEFORE A TEST
  58. #-----------------------------------------------------------------------------
  59. # You can use one of the keyword:
  60. # SEQUENCE To set a database sequence to a value (see examples, for Oracle only)
  61. # SQL To delete/insert some records in the database (see examples)
  62. # SCRIPT To launch an external script
  63. #
  64. # Examples:
  65. # SEQUENCE "myseq" $PARAM3+1
  66. # SQL "delete from customers where id_customers < ".($PARAM1+$PARAM2)
  67. # SCRIPT "myscript.exe"
  68. #-----------------------------------------------------------------------------
  69. <PRE ACTIONS>
  70. </PRE ACTIONS>
  71. # LIST OF ORDERED URLS TO TEST
  72. #-----------------------------------------------------------------------------
  73. # Use the following format:
  74. # GET To get an HTML page (using GET HTTP method, like HTML links)
  75. # POST To get an HTML page (using POST HTTP method, like HTML forms)
  76. # CHECKYES To check if string is found in last response (using POSIX regex)
  77. # CHECKNO To check if a string is not found in last response (using POSIX regex)
  78. # VAR To extract a parameter from last response (using POSIX regex)
  79. # SEQUENCE To set a database sequence to a value (see examples, for Oracle only)
  80. # SQL To delete/insert some records in the database (see examples)
  81. # SCRIPT To launch an external script
  82. # WRITETO Write last html response to a file
  83. # WRITETOH Write last html response with its HTTP header to a file (full response)
  84. # AUTO To make a GET on all URLs find in last HTML response page and follow
  85. # links on n level
  86. # DELAY To change the wait delay used after requests on URLs
  87. #
  88. #
  89. # Examples:
  90. # GET "http://$SERVER/mypage.html?x=y&v=w"
  91. # POST "http://$SERVER/mypage.html?x=y&v=w"
  92. # CHECKYES "xxx"
  93. # CHECKNO "eee"
  94. # VAR "VARNAME:idvar=(\d)"
  95. # SEQUENCE "myseq" $PARAM3+1
  96. # SQL "delete from customers"
  97. # SCRIPT "myscript.exe"
  98. # WRITETO "myfile.html"
  99. # WRITETOH "myfile.http"
  100. # AUTO 1
  101. # DELAY 2
  102. #-----------------------------------------------------------------------------
  103. <ACTIONS>
  104. GET "http://$SERVER/dolibarr_new/user/logout.php"
  105. CHECKYES "loginfunction"
  106. POST "http://$SERVER/dolibarr_new/index.php?username=admin&password=bad"
  107. CHECKYES "Bad value for login or password"
  108. POST "http://$SERVER/dolibarr_new/index.php?username=admin&password=admin"
  109. CHECKYES "Dolibarr - Home area"
  110. GET "http://$SERVER/dolibarr_new/societe/index.php?mainmenu=companies&leftmenu="
  111. CHECKYES "Third parties area"
  112. GET "http://$SERVER/dolibarr_new/admin/tools/index.php?mainmenu=home&leftmenu=admintools"
  113. </ACTIONS>
  114. # LIST OF ACTIONS TO EXECUTE AFTER A TEST
  115. #-----------------------------------------------------------------------------
  116. # You can use same rules for LIST OF ACTIONS TO EXECUTE BEFORE A TEST.
  117. #-----------------------------------------------------------------------------
  118. <POST ACTIONS>
  119. </POST ACTIONS>