Re: check expression proposal.
Status: Alpha
Brought to you by:
coroberti
From: Robert I. <cor...@gm...> - 2007-07-04 09:12:22
|
On 7/4/07, Michael Moser <mos...@gm...> wrote: > Proposal for limited scripting facility in curl-loader Great! > ------------------------------------------------------ > > scope: test result of fetching a url. > the facility must be able to > - test condition on body content and header content OK > - conditional branching of flow Great! > - return error messages Probably, also to add some counters to statistic, like Err-Body, Err-Hdrs? > - output messages into log. OK. Also some counters per client statistics? Just not to forget, that we have logging of responses and headers to files. This feature should still work (to test). > > New tags in configuration file. > > url=http://kuku/ > onget=<event_syntax> > Great! Makes it sense to separate it into events on response bodies and separately events on response headers? > onget is an action associated with action of processing a specific url; > it is processed after the url has been retrieved/processed. > > (possible feature: event tag for execution prior to sending, so that we can > manipulate header content, request url, dynamically) We can manipulate headers statically via tag HEADER. Do you mean dynamic manipulations? What we have in TODO list is also rather vague: 1. HTML analyses. libcurl example is using libtidy in: http://www.koders.com/c/fid7923BF828D0534D6B747ED138FCDD50DCFD13B3F.aspx 2. A regular expression pattern for a search in a response body Look in Apache JMeter. 3. Regular expression operations for the header/s certain header and whether value matches a regular expression pattern. 4. Vladislav proposed to add extraction of a field from response to be used in the next requests. Let's try to come with a some narrow + broad subsets of features, that we wish to implement, thus we can get a better filling of what we need to develop. Probably, you can look in WebLoad and JMeter, and in meanwhile Vladislav, who is the former Mercury brain, can advise us in more details regarding the features of LoadRunner not to spend time on their docs. > - grammar is written with right recursion (since most probably there will be > recursive descent parser) > > <event_syntax> ::= <statement-list> > > <statement-list> ::= <statement> | <statement> ; <statement-list> > > <statement> ::= <goto_statement> | <label_definition> | <ifcondition> | > <return> | <msg> > > <label_definition> ::= IDENTIFIER : > - label definition > > <goto_statement> ::= goto <IDENTIFIER> > - branch definition > > <msg> ::= echo <quoted string> > - output to log file > > <return> ::= return NUMBER > - stop execution of this client, return the number as status for this run. > > <ifcondition> ::= if <condition> <statement-list> [<else-clause>] fi > > <else-clause> ::= elsif <condition> <statement-list> <else-clause> | else > <statement-list> > > > - condition can test for content of body or header > - > <condition> ::= <and-condition> | <or-condition> > > <and-condition> ::= <or-condition> && <and-condition> | <or-condition> > > <or-condition> ::= <or-condition> || <test_condition> | <test_condition> > > <test-condition> ::= ( <condition> ) | > <string-item> =~ /REGEX-STRING/ | # > search regex > <string-item> eq QUOTED-STRING | > <string-item> ne QUOTED-STRING | > <int-item> eq INT_CONSTANT | > <int-item> ne INT_CONSTANT | > <int-item> gt INT_CONSTANT | (alo lt lte) regexp? > - item that has int value > <int-item> ::= RESPONSE-STATUS > > - item that has string value > <string-item>::= HEADER( IDENTIFIER ) | > RESPONSE-BODY | I am OK with that. Could you, please, look on the JMeter regexp and other HTTP response analyzes? Thanks, looks like we can define it more precisely and to develop a great facility! Michael, there is an option, that Vlad will wish to join the efforts to share the design & implementation load. I need to run more testing and to improve/update documentation, therefore next version (stable 0.40) may be released in a week. -- Sincerely, Robert Iakobashvili, coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net A web testing and traffic generation tool. |