Re: Help with authentication

Gary Mulder <[email protected]> Tue, 25 Nov 2014 18:34:56 +0000
Newsgroups gmane.comp.java.grinder.user
Message-ID <CAKy9zTC57r-3WAs2u96uBkPBFwd+a1Rf5h2ngFXhXB8zdd0rHw@mail.gmail.com>
On 25 November 2014 at 17:59, Sean Tiley <[email protected]> wrote:

> Thank you for the quick response Ouray.
> I used Fiddler2 to inspect the headers and I saw the following
>
> Authorization: NTLM
> TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==
>
> I addedthe followong to the default headers
>  NVPair('Authorization','NTLM
> TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==')
>
> And I am still getting http 401 on all responses, is there something
> else?  Sorry I do not really understand the header stuff..
>

Generally you're going to have to understand most parts (i.e. both the
headers and bodies sent and received) of the HTTP requests you are making
in order to run automated tests. Sadly, many web applications manage
authentication slightly differently so your devs are the best source of
knowledge on how it works. Normally the functional testers for the app
encounter the same type issues so you may find they have already solved the
same login/authentication problem in their automated functional tests.

The above non-standard header looks like a session id that was generated
when you authenticated with the web app. Grinder records a session with a
single session id for that specific session which likely ends when you
logout. You need to parse the response from each login request to obtain
the (new) session id for that session, and use that as a parameter to
submit as a header to your subsequent requests as part of the same session.
Session ids sometimes have a tendency to expire, so its good to check with
the developers on how long the session id is valid for.

Regards,
Gary

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

_______________________________________________
grinder-use mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use