jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin D. Wilson" <rwils...@gmail.com>
Subject RE: Login test always returns success
Date Fri, 05 Jun 2015 13:26:53 GMT
Actually, you should only need the Response Assertion, the regular expression extractor would
be necessary only if you needed to use the variable later in the test script.

Keep in mind, adding 'parsers' to responses increases the amount of effort JMeter has to put
into running the test - slowing JMeter down. While it is certainly necessary to have some
of these elements in your test plan, it is best to keep them to the minimum necessary to complete
the objective.


--
Robin D. Wilson
Sr. Director of Web/Java Engineering
KingsIsle Entertainment, Inc.
VOICE: 512-777-1861
www.KingsIsle.com

-----Original Message-----
From: Vincent Lequertier [mailto:sky@riseup.net] 
Sent: Friday, June 05, 2015 8:19 AM
To: JMeter Users List
Subject: Re: Login test always returns success

Got it to work through regular expression extractor and variable-based response assertion.
Thank you for the pointer :-)

---
Vincent Lequertier
sky@riseup.net

Le 2015-06-05 14:48, Bob Nance a écrit :
> Use a regular expression extractor to look for that string and act on 
> it. Fail the test if you get that string.
> 
> ---
>  Bob Nance
>  Novation Systems
>  256-534-4620
> 
> (iPhone-flavored)
> 
> 
>> On Jun 5, 2015, at 7:37 AM, Vincent Lequertier <sky@riseup.net> wrote:
>> 
>> Hi,
>> 
>> I'm building a test plan to test login on a web app. I'm using an 
>> HTTP request with the POST method. If the credentials are incorrect, 
>> the website is returning an alert() in javascript, like this:
>> 
>> <script language="JavaScript">
>>    alert('le code utilisateur et/ou le mot de passe sont 
>> incorrects'); </script>
>> 
>> And the URL returned looks like this: xxxxx/login.do?login_error=1
>> 
>> Actually, although the login fails, the test returns success because 
>> IMHO jmeter does not take care of that. How can I make jmeter analyse 
>> the response from the request so it can grab the javascript code 
>> and/or URL and then indicates the error? As I'm new to the jmeter 
>> world, can someone provide me a step by step to do this?
>> 
>> Let me know if you need more infos. Thanks in advance for any help.
>> 
>> --
>> Vincent Lequertier
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org

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


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


Mime
View raw message