You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Carl Shaulis <cs...@homeaway.com> on 2009/12/02 21:13:17 UTC
Logical Assertions
Hello JMeter community,
I have a question regarding assertions for the samplers. When I submit some
XML via jmeter I expect three different types of responses. Can I set up
the assertions to be logical assertions rather than a single explicit
assert?
Assert ³ok² or assert ³no² or assert ³Stuff²
I would prefer to only use one sampler and assert that anyone of the above
three responses are present in the response data. I could create three
thread groups and three sets of data targeting each type of response. I
would prefer to send in random data and validate that one of these three
responses is present.
If I set up the test with a single assert for ³OK² my test passes since the
response data is OK. If I add assertions for ³no² or ³stuff², then the OK
passes and the other two assertions fail. I want the test to pass if it
finds anyone of the three values.
Any suggestions would be appreciated!
Carl
Re: Logical Assertions
Posted by Carl Shaulis <cs...@homeaway.com>.
Works perfectly! Thanks Sebb!
On 12/2/09 2:51 PM, "sebb" <se...@gmail.com> wrote:
> On 02/12/2009, Carl Shaulis <cs...@homeaway.com> wrote:
>> Hello JMeter community,
>>
>> I have a question regarding assertions for the samplers. When I submit some
>> XML via jmeter I expect three different types of responses. Can I set up
>> the assertions to be logical assertions rather than a single explicit
>> assert?
>>
>> Assert ³ok² or assert ³no² or assert ³Stuff²
>>
>> I would prefer to only use one sampler and assert that anyone of the above
>> three responses are present in the response data. I could create three
>> thread groups and three sets of data targeting each type of response. I
>> would prefer to send in random data and validate that one of these three
>> responses is present.
>>
>> If I set up the test with a single assert for ³OK² my test passes since the
>> response data is OK. If I add assertions for ³no² or ³stuff², then the OK
>> passes and the other two assertions fail. I want the test to pass if it
>> finds anyone of the three values.
>
> Try RE alternation, i.e.
>
> OK|no|stuff
>
>> Any suggestions would be appreciated!
>>
>>
>> Carl
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Logical Assertions
Posted by sebb <se...@gmail.com>.
On 02/12/2009, Carl Shaulis <cs...@homeaway.com> wrote:
> Hello JMeter community,
>
> I have a question regarding assertions for the samplers. When I submit some
> XML via jmeter I expect three different types of responses. Can I set up
> the assertions to be logical assertions rather than a single explicit
> assert?
>
> Assert ³ok² or assert ³no² or assert ³Stuff²
>
> I would prefer to only use one sampler and assert that anyone of the above
> three responses are present in the response data. I could create three
> thread groups and three sets of data targeting each type of response. I
> would prefer to send in random data and validate that one of these three
> responses is present.
>
> If I set up the test with a single assert for ³OK² my test passes since the
> response data is OK. If I add assertions for ³no² or ³stuff², then the OK
> passes and the other two assertions fail. I want the test to pass if it
> finds anyone of the three values.
Try RE alternation, i.e.
OK|no|stuff
> Any suggestions would be appreciated!
>
>
> Carl
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org