jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Swackhamer" <brian.swackha...@benefitfocus.com>
Subject RE: HTTPS request to a sites login page produces JAVA error when I run it through JMeter
Date Thu, 22 Jun 2006 20:33:16 GMT
Well, I see that the cookie manager is handling my domain cookies now
that I am on the latest version on JMeter but I still do not see it
handling my document.cookie.  Attached is the code from the login page
and my test plan.  I recorded it using Badboy, but it does not playback,
then exported to JMeter.

Not sure what else I can do.  The username and password in the test plan
will not work as they are fake but the rest is correct.

Thanks,
Brian

-----Original Message-----
From: Daniel L. Gregoire [mailto:dlg.toastman@gmail.com] 
Sent: Thursday, June 22, 2006 1:14 PM
To: JMeter Users List
Subject: Re: HTTPS request to a sites login page produces JAVA error
when I run it through JMeter

Willingham Geoff wrote:
> Regarding the cookies, take a look at the HTTP Cookie Manager (a
config
> element) in the User Manual - I think it should handle both domain
> cookies, and document cookies...  (not sure about the doc. cookie tho)

>
> No idea about the document action tho...
>
> Perhaps make use of the HTTP Proxy to automatically build the test
> script - this will capture everything your browser sends to the server
-
> including hidden fields, and values inserted via javascript.
>
> Just a couple of thoughts from a newish user ;)
>
> Geoff
>
> -----Original Message-----
> From: Brian Swackhamer [mailto:brian.swackhamer@benefitfocus.com] 
> Sent: 22 June 2006 15:14
> To: JMeter Users List
> Subject: RE: HTTPS request to a sites login page produces JAVA error
> when I run it through JMeter
>
> I have taken a look at the source code from my website and found that
> when I submit the form it is setting some cookies?  First off, how do
I
> set cookies using JMeter (this is setting a document cookie and 2
domain
> cookies)?  My second question is how do I set a document action in
> JMeter?
>
> I really do not know anything about JAVA or Jscript so please make
your
> responses as dumbed down as possible or even if you could point me in
> the right direction I may be able to google my way to a good solution.
>
> Thanks,
> Brian
>
> -----Original Message-----
> From: Daniel L. Gregoire [mailto:dlg.toastman@gmail.com]
> Sent: Wednesday, June 21, 2006 6:14 PM
> To: JMeter Users List
> Subject: Re: HTTPS request to a sites login page produces JAVA error
> when I run it through JMeter
>
> This was my fix to a similar problem.
>
> As long as you are posting all of the necessary fields of the web
page's
> form to the correct URL, you should still be able to successfully log
> in.  Look at the JavaScript source to make sure none of the values are
> being encoded (e.g. the password), and if they are, imitate the
> Javascript behavior and post the final results.
>
> Try looking to see if there is a redirecting link on the "You're
> Javascript is not enabled" page.
>
> For my own test, I post both to the URL of such a redirecting link,
and
> to the normal login URL of my website to login, and it works.
>
>
> Daniel L. Gregoire
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>
************************************************************************
> ****************
> BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is
> intended only for the individual or entity to which it is addressed
and
> may contain information that is confidential and protected by law.
> Unauthorized review, use, disclosure, or dissemination of this
> communication or its contents in any way is prohibited and may be
> unlawful. If you are not the intended recipient or a person
responsible
> for delivering this message to an intended recipient, please notify
the
> original sender immediately by e-mail or telephone, return the
original
> message to the original sender or to bfpostmaster@benefitfocus.com,
and
> destroy all copies or derivations of the original message. Thank you.
> (BFeComNote Rev. 08/01/2005)
>
************************************************************************
> ***************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
> This e-mail is confidential and privileged. If you are not the
intended recipient please accept our apologies; please do not disclose,
copy or distribute information in this e-mail or take any action in
reliance on its contents: to do so is strictly prohibited and may be
unlawful. Please inform us that this message has gone astray before
deleting it. Thank you for your co-operation.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>   
The Http Cookie Manager should take care of the cookies, but the Http
Proxy mechanism can only follow HTTP activity, not HTTPS (due to
encryption).  You can also try BadBoy or TestGen4Web (an add-on for
Firefox).

As for JavaScript, there are many free tutorials on the web if need be.

A general format for logging in involves a JavaScript "FORM" element,
the contents of which you send as parameters with your HTTP POST in
JMeter.  For values in your FORM, you'll see "INPUT" elements in the
page source code, e.g.

<INPUT VALUE="login" NAME="action" TYPE="hidden">

There should be several.  Probably one for "username" or something
similar, "password," as well as others depending on the setup.  After
identifying the various INPUT's that you'll need to POST, read through
the source to discover if there are any other functions used while
logging in (password encryption, etc.).  Put the names and values from
these INPUT's in the "Send Parameters with the Request" table in your
HTTP Request sampler in JMeter(note that some of these values may be
sent with null values, just check the page source code).  Everything you
need to send via POST should be discernible from the page source code. 
These are the steps I had to follow to log in.

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



****************************************************************************************
BENEFITFOCUS.COM CONFIDENTIALITY NOTICE: This electronic message is intended only for the
individual or entity to which it is addressed and may contain information that is confidential
and protected by law. Unauthorized review, use, disclosure, or dissemination of this communication
or its contents in any way is prohibited and may be unlawful. If you are not the intended
recipient or a person responsible for delivering this message to an intended recipient, please
notify the original sender immediately by e-mail or telephone, return the original message
to the original sender or to bfpostmaster@benefitfocus.com, and destroy all copies or derivations
of the original message. Thank you.  (BFeComNote Rev. 08/01/2005)
***************************************************************************************


Mime
View raw message