jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Rancati <i...@sharpmind.de>
Subject Re: Matching one of several strings in Response Assertion
Date Fri, 12 Jan 2007 11:04:15 GMT

Yes, the output is correct. Could there be a limitation/bug on the length of
the data or the variable name? (my variable names are actually 6 character
longer than in my sample, there was a company name that I removed for
compactness in my original mail)
I will try with shorter variable names and see if it makes a difference



sebb-2 wrote:
> 
> Works fine for me using
> 
> ${A}|${B}|c
> 
> where A=a and b=b with input of either a (succeeds) or d (fails)
> 
> Are you sure the output contains the correct data?
> 
> 
> On 11/01/07, Ivan Rancati <ivan@sharpmind.de> wrote:
>>
>> An API I am testing can return one of several strings, that look like
>> this
>>
>> 61A6C22QXPUZA6G2XD
>> FJKTCS7597QWBZ29Y9
>> 8PGUE8J7NM72AWMA8H
>> DQS23CB9J4MXJ4NWGW
>> CBMX24WPUKJHW32FFS
>> AQ4PA3VGAGJRB2A191
>> 8BF98WM3RFYT4J6ZJ9
>>
>> I have a variable for each of these possible matches, and in the Response
>> Assertion, I want the test to pass if one of the above 7 strings is
>> returned.
>> So my regex looks like
>>
>> ${mn6ac1}|${mn6ac2}|${mn6ac3}|${mn6ac4}|${mn6ac5}|${mn6ac6}|${mn6ac7}
>>
>> If I run it, however, it looks like the pipe characters are not
>> interpreted
>> as "alternation"
>> (see http://www.regular-expressions.com/alternation.html)
>> but are literally interpreted, as the Assertion Results listener shows
>>
>> Test failed, text expected to match
>> /61A6C22QXPUZA6G2XD|FJKTCS7597QWBZ29Y9|8PGUE8J7NM72AWMA8H|.....
>>
>> I have tried to group with parenthesis too, but that does not work
>> either.
>>
>> All suggestions welcome
>> Ivan
>> --
>> View this message in context:
>> http://www.nabble.com/Matching-one-of-several-strings-in-Response-Assertion-tf2959081.html#a8278091
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Matching-one-of-several-strings-in-Response-Assertion-tf2959081.html#a8296534
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Mime
View raw message