Fix thread_key plugin connector
[MonkeyD.git] / qa / docs_httest.txt
blob07556c955fae3d46f83ac6c6cc5f51df18f9c3a7
1 Global Commands
2 ---------------
3 BLOCK <name>
4 Store a block of commands to call it from a CLIENT/SERVER/BLOCK
6 CLIENT [<number of concurrent clients>]
7 Client body start, close it with END and a newline
9 DAEMON 
10 Daemon body start, close it with END and a newline. 
11 A daemon will not join CLIENT/SERVER and could therefore be used
12 for supervisor jobs
14 END
15 Close CLIENT|SERVER body
17 EXEC <shell command>
18 Execute a shell command, attention executes will not join CLIENT/SERVER
20 GO 
21 Starts all client in sync mode
23 INCLUDE <include file>
24 Load and execute defined include file,
25 current path is taken the callers current path
27 SERVER [<SSL>:]<port> [<number of concurrent servers>]
28 Server body start, close it with END and a newline,
29 Do load server.cert.pem and server.key.pem if found in local directory,
30 number of concurrent servers, -1 for unlimited,
31 <SSL>: SSL, SSL2, SSL3, TLS
33 SET <variable>=<value>
34 Store a value in a global variable
36 TIMEOUT <timeout in ms>
37 Defines global socket timeout
40 Local Commands 
41 -------------
42 -__ <string>
43 Send <string> to the socket with a CRLF at the end of line
45 _- <string>
46 Same like __ but no CRLF at the end of line
48 _ADD_HEADER <header> <value>
49 Add additional header to received headers to force forexample chunked encoding
51 _BPS <n>
52 Send not more than defined Bytes per second
53 close body with _END BPS
55 _CALL <name of block>
56 Call a defined block
58 _CERT <cert-file> <key-file> [<ca-cert-file>]
59 Sets cert for the current ssl connection, mainly used for server cert
61 _CHUNK 
62 Mark the end of a chunk block, all data after last _FLUSH are counted,
63 does automatic add chunk info
65 _CLOSE 
66 Close the current connection and set the connection state to CLOSED
68 _DEBUG <string>
69 Prints to stderr for debugging reasons
71 _DOWN 
72 Shutdown listener
74 _EXEC <shell command>
75 Execute a shell command, _EXEC| will pipe the incoming stream on the
76 socket in to the called shell command
78 _EXIT [OK|FAILED]
79 Exits with OK or FAILED default is FAILED
81 _EXPECT . "[!]<regex>"
82 Define what data we do or do not expect on a WAIT command.
83 Negation with a leading '!' in the <regex>
85 _FLUSH 
86 Flush the cached lines, 
87 the AUTO Content-Length calculation will take place here
89 _HEADER ALLOW|FILTER <header name>
90 Defines allowed headers or headers to filter,
91 default all headers are allowed and no headers are filtered.
92 Filter only for receive mechanisme
94 _IF "<expression>" MATCH "[!]<regex>"
95 Test if variable do or do not match the regex, close body with _END IF,
96 negation with a leading '!' in the <regex>,
97 <expression> must not be empty
99 _IGNORE_ERR <regex>
100 This command is Depreciated, do not use it
101 Ignores errors specified in <regex>, 
102 i.e. ".*" would ignore all errors, only .* is implemented
104 _LOG_LEVEL <level>
105 Level is a number 0-4
107 _LOOP <n>
108 Do loop the body <n> times,
109 close body with _END LOOP
111 _MATCH (headers|body|error) "<regex>" <variable>
112 Define a regex with a match which should be stored in <variable>
114 _MATCH EXEC "<regex>" <variable>
115 _EXEC algun_comando
116 (No documentado; aparece en los ejemplos de la página web)
117 Hace lo mismo que _MATCH pero con la salida del comando ejecutado en _EXEC
119 _ONLY_PRINTABLE on|off
120 Replace all chars below 32 and above 127 with a space
122 _OP <left> ADD|SUB|DIV|MUL <right> <variable>
123 Store evaluated expression
125 _PIPE [chunked [<chunk_size>]]
126 Start a pipe for stream the output of EXEC to the socket stream,
127 wiht optional chunk support
129 _RAND <start> <end>
130 Generates a number between <start> and <end>
132 _RECV <bytes>|POLL
133 Receive an amount of bytes, either specified by a number 
134 or as much until socket timeout will in POLL mode
136 _REQ <host> [<SSL>:]<port>[:<tag>] [<cert-file> <key-file> [<ca-cert-file>]]
137 Start a request to defined host:port, with SSL support.
138 Does only open a new connection if we are in connection state CLOSED
139 <SSL>: SSL, SSL2, SSL3, TLS<tag>:Additional tag info do support multiple connection to one target
140 <cert-file>, <key-file> and <ca-cert-file> are optional for client/server authentication
142 _RES 
143 Wait for a connection accept
145 _SENDFILE <file>
146 Send file over http
148 _SET <variable>=<value>
149 Store a value in a local variable
151 _SH shell script line or END
152 Embedded shell script within a tmp file, execute if END is found
154 _SLEEP <milisecond>
155 Sleep for defined amount of time
157 _SOCKSTATE <variable>
158 Stores connection state CLOSED or CONNECTED in the <variable>
160 _SYNC 
161 Synchronise to the next full second
163 _TIME <variable>
164 Store time in variable [ms]
166 _TIMEOUT <miliseconds>
167 Set socket timeout of current socket
169 _UP 
170 Setup listener
172 _VERIFY_PEER 
173 Gets peer cert and validate it
175 _WAIT [<amount of bytes>]
176 Wait for data and receive them.
177 EXPECT and MATCH definitions will be checked here on the incoming data.
178 Optional you could receive a specific amount of bytes
180 _WHICH <variable>
181 Stores the concurrency number of current thread