You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by pskala <sa...@gmail.com> on 2009/07/07 08:43:14 UTC
How to use response assertions for text maching
Hi all,
After creating a user a successmessage will display in my application like
"Created a new user account. No e-mail has been sent." I want to capture it
in response assertions. how can i do that
I tried with so many ways like
Text Response - Contains
Text Response - Matches
Text Response - equals
but the assertion is failing. This text is not html when i see the souce
code it is displaying as "<div class="messages status">
Created a new user account. No e-mail has been sent.</div>."
Please help me how can match this text in response assertion
--
View this message in context: http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24367962.html
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
Re: How to use response assertions for text maching
Posted by Noel O'Brien <no...@newbay.com>.
If in doubt, try using a visual regex tool like
http://www.nregex.com/nregex/default.aspx
to try debug your regex expression
Regards,
Noel
----- "pskala" <sa...@gmail.com> wrote:
>
> Hi,
>
> Thanks for your reply, I tried with this still test is failing. I want to
> match the whole text "Created a new user account. No e-mail has been sent."
> or at least "Created a new user account"
>
> Please let me know how can I match using regular expression strings
>
> I tried with Text Response>contains>pattern as (?i)created.* it is working
> fine, but I want to match the whole text.
>
>
> Thankyou
> sasikala
>
>
> Jose Pablo Sarco-2 wrote:
> >
> > Try with:
> >
> > Text Response - Contains
> > Regular expression:
> >
> > ([.]*[\s]*)<div class="messages status">\WCreated a new user account\. No
> > e-mail has been sent\.<\/div>
> >
> >
> > I hope it helps.
> >
> > Jose Pablo Sarco
> >
> > On Tue, Jul 7, 2009 at 7:43 AM, pskala <sa...@gmail.com> wrote:
> >
> >>
> >> Hi all,
> >>
> >> After creating a user a successmessage will display in my application
> >> like
> >> "Created a new user account. No e-mail has been sent." I want to capture
> >> it
> >> in response assertions. how can i do that
> >>
> >> I tried with so many ways like
> >> Text Response - Contains
> >> Text Response - Matches
> >> Text Response - equals
> >>
> >> but the assertion is failing. This text is not html when i see the souce
> >> code it is displaying as "<div class="messages status">
> >> Created a new user account. No e-mail has been sent.</div>."
> >>
> >> Please help me how can match this text in response assertion
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24367962.html
> >> 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
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24388043.html
> 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
>
>
--
Regards,
Noel
Re: How to use response assertions for text maching
Posted by pskala <sa...@gmail.com>.
Hi,
Thanks for your reply, I tried with this still test is failing. I want to
match the whole text "Created a new user account. No e-mail has been sent."
or at least "Created a new user account"
Please let me know how can I match using regular expression strings
I tried with Text Response>contains>pattern as (?i)created.* it is working
fine, but I want to match the whole text.
Thankyou
sasikala
Jose Pablo Sarco-2 wrote:
>
> Try with:
>
> Text Response - Contains
> Regular expression:
>
> ([.]*[\s]*)<div class="messages status">\WCreated a new user account\. No
> e-mail has been sent\.<\/div>
>
>
> I hope it helps.
>
> Jose Pablo Sarco
>
> On Tue, Jul 7, 2009 at 7:43 AM, pskala <sa...@gmail.com> wrote:
>
>>
>> Hi all,
>>
>> After creating a user a successmessage will display in my application
>> like
>> "Created a new user account. No e-mail has been sent." I want to capture
>> it
>> in response assertions. how can i do that
>>
>> I tried with so many ways like
>> Text Response - Contains
>> Text Response - Matches
>> Text Response - equals
>>
>> but the assertion is failing. This text is not html when i see the souce
>> code it is displaying as "<div class="messages status">
>> Created a new user account. No e-mail has been sent.</div>."
>>
>> Please help me how can match this text in response assertion
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24367962.html
>> 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
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24388043.html
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
Re: How to use response assertions for text maching
Posted by Jose Pablo Sarco <jo...@gmail.com>.
Try with:
Text Response - Contains
Regular expression:
([.]*[\s]*)<div class="messages status">\WCreated a new user account\. No
e-mail has been sent\.<\/div>
I hope it helps.
Jose Pablo Sarco
On Tue, Jul 7, 2009 at 7:43 AM, pskala <sa...@gmail.com> wrote:
>
> Hi all,
>
> After creating a user a successmessage will display in my application like
> "Created a new user account. No e-mail has been sent." I want to capture it
> in response assertions. how can i do that
>
> I tried with so many ways like
> Text Response - Contains
> Text Response - Matches
> Text Response - equals
>
> but the assertion is failing. This text is not html when i see the souce
> code it is displaying as "<div class="messages status">
> Created a new user account. No e-mail has been sent.</div>."
>
> Please help me how can match this text in response assertion
> --
> View this message in context:
> http://www.nabble.com/How-to-use-response-assertions-for-text-maching-tp24367962p24367962.html
> 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
>
>