Duh!

Try the following JavaScript

"${JMeterThread.last_sample_ok}" == "true"

Turns out this is set by the thread after all the assertions have been
applied to a sample, and used in the While Controller.

My brain must still be on holiday...

S.
On 13/01/06, sebb <[EMAIL PROTECTED]> wrote:
> On 13/01/06, Noam Paz <[EMAIL PROTECTED]> wrote:
> >
> > I'd use a variable global to a thread group. This way you don'T have to 
> > change
> any controller and you can use it in the if controller without need of
> heavy JavaScript.
> > Something like    ${rc} == 0     will do then.
>
> OK ...
>
> > I would consider a request to be successfull if it OK from BOTH technical 
> > and business views, the latter is determined by the assertions. Actually 
> > this is the way things work now.
> >
> > Since the logic to determine if the request was successful already exists, 
> > the only effort I see is making the internal variable public in the thread 
> > context. This might well be less work than modifying controlls and their 
> > GUIs.
>
> The existing logic does not use variables, it uses methods on the
> sample response, so code would need to be added to create and set the
> variable every time it changes.
>
> The LAST code already exists in While Controller, and could be adapted
> for the If Controller.
>
> > I would at first just supply the variable, (integer and not boolean, for 
> > later
>
> The variable name will have to be somehow unique to avoid clashing
> with existing variables people may have used.
> E.g. could allow the name to be overridden in jmeter.properties.
>
> > enhancements), so the user can check for ==0 and !=0.
>
> In which case my suggestion of
>
> ?SUCCESS
>
> etc would satisfy the requirement too
>
> > This would be a major improvement for me.
>
> > Later we can enhance the feature and provide various return codes for 
> > covering different errors, but this seems for me being of seconary 
> > importance.
>
> I don't see how RC==0 and RC!=0 can readily be extended and still make
> sense; so I'd rather not add this until the strategy is defined, in
> case 0 turns out to be a bad starting point.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to