You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Alf Høgemark <al...@i100.no> on 2007/03/17 08:56:55 UTC

Adding condition for all Assertions ?

Hi

In my test plan, I have added som Assertions, namely
ResponseAssertion.
However, some of the Assertions only makes sense if some variables in
the test plan has a certain value.
So in some cases the Assertion needs to be checked for a certain HTTP
Request, but in other cases the assertion should not be evaluated.

I'm thinking that it would be useful to add a "Condition" to all the
Assertions. This "Condition" would work the same way as for the
logic IfController.
If the condition evaluates to true, then the Assertion will be
checked, if it evaluates to false, then the Assertion is not checked.
If no condition is specified, the Assertion will be evaluated.

Does this sound like reasonable functionality ?

I am also thinking that by making it possible to add "Logic controllers" 
as children to "Samplers",
then one could have the following structure
HTTP Request
    IFController
       ResponseAssertion
or
HTTP Request
    WhileController
       ResponseAssertion

What method do to achieve conditional assertions do you think is best, 
adding a condition to all Assertions, or
make it possible to add logic controllers as children to samplers ?

Does some of this sounds like something I should spend time on ?

Regards
Alf Hogemark



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Adding condition for all Assertions ?

Posted by Alf Høgemark <al...@i100.no>.
I've been thinking a bit more about this.

To be able to use the existing "Logic Controllers" would be most 
powerful and elegant, since then you could also create loops, and check 
lots of assertions dynamically.
But I'm afraid it might be quite complex to get that to work, because 
then you can have unlimited nesting of all elements in the test plan, I 
think.
Currently that is avoided, since you cannot for example add "Logic 
Controllers" as a child to a Sampler.

Does anybody know if it is possible currently to get "conditional 
Assertions" in a Test plan, i.e. where you can do an "if test on a user 
defined variable to check if the assertion should be executed" ?

How does my idea about adding a condition field to all the Assertions 
sound ?

Regards
Alf Hogemark


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org