[Webtest] Login Problem

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Wed, 02 May 2007 15:23:21 +0200


I'm not sure: does it mean that your test now works?

Marc.

Ian Phillips wrote:
> Hi Marc.
> 
> I have investigated cookies a bit more (I disabled all cookies and found
> I could not log in).  So hopefully I have found my answer.  The
> developer appears not to know his own application as I was told by him
> that cookies were not used.
> 
> Thanks for the help.
> 
> Ian
> 
> On 4/30/07, *Marc Guillemot* <mguillemot@yahoo.fr
> <mailto:mguillemot@yahoo.fr>> wrote:
> 
>     and could you "see" (with the application log for instance) why the
>     application decides to refuse login?
> 
>     Marc.
> 
>     Ian Phillips wrote:
>     > Hi Marc.
>     >
>     > I have monitored the http conversation and the correct information
>     does
>     > appear to be sent.  I have been told by the developer that cookies are
>     > not used.
>     >
>     > Thanks.
>     >
>     > Ian
>     >
>     >
>     > On 4/30/07, *Marc Guillemot* < mguillemot@yahoo.fr
>     <mailto:mguillemot@yahoo.fr>
>     > <mailto:mguillemot@yahoo.fr <mailto:mguillemot@yahoo.fr>>> wrote:
>     >
>     >     Hi Ian,
>     >
>     >     have you tried to monitor the http conversation? Do you use
>     cookies? May
>     >     it be due to a cookie format problem?
>     >
>     >     Marc.
>     >
>     >     Ian Phillips wrote:
>     >     > Hi.
>     >     >
>     >     > I am having a problem getting webtest to login.  It appears
>     not to
>     >     > accept the username and/or password.
>     >     >
>     >     > My login page looks like this:
>     >     >
>     >     > FORM METHOD=post
>     >     > ACTION
>     >     > ="index.php ">
>     >     > <table align=center>
>     >     >       <
>     >     > tr><th>Name: <td><INPUT
>     >     >  SIZE=10
>     >     > NAME="login">
>     >     >       <tr><th>Password:<
>     >     > td> <INPUT SIZE
>     >     > =10 TYPE="password"
>     >     > NAME="passwd">
>     >     >       <tr><td colspan
>     >     > =2 align
>     >     > =center>
>     >     >
>     >     >       <INPUT
>     >     >  TYPE="hidden" NAME="what" VALUE=
>     >     > "loggon_step"
>     >     >>
>     >     >       <INPUT TYPE="hidden" NAME=
>     >     > "myGroup" VALUE="-1">
>     >     >       <INPUT
>     >     >  TYPE=
>     >     > "submit" VALUE=" Login ">
>     >     > </table>
>     >     > </FORM>
>     >     >
>     >     > My script looks like this:
>     >     >
>     >     > <project name="SimpleTest" basedir="." default="main">
>     >     >
>     >     >   <property name="webtest.home " location="C:\canoo" />
>     >     >   <import file="${webtest.home}/lib/taskdef.xml"/>
>     >     >
>     >     >   <target name="main">
>     >     >     <webtest name="myTest">
>     >     >       <config
>     >     >         host="wokingham"
>     >     >         port="29920"
>     >     >         protocol="http"
>     >     >         basepath=""
>     >     >         summary="true"
>     >     >         saveresponse="true"
>     >     >         autorefresh="true"/>
>     >     >
>     >     >       <steps>
>     >     >         <invoke
>     >     >           description="get Login Page"
>     >     >           url="" />
>     >     >         <verifyTitle
>     >     >           description="we should see the login title"
>     >     >           text="KPSA" />
>     >     >         <setInputField description="set user name"
>     >     >           name="login"
>     >     >           value="KOPAdmin" />
>     >     >         <setInputField description="set password"
>     >     >           name="passwd"
>     >     >           value="*****" />
>     >     >         <clickButton
>     >     >           label=" Login "
>     >     >           description="Login" />
>     >     >         <verifyTitle
>     >     >           description="we should see the Admin title"
>     >     >           text="KPSA Administration" />
>     >     >       </steps>
>     >     >     </webtest>
>     >     >   </target>
>     >     > </project>
>     >     >
>     >     > I can manually login so I know the username/password are
>     OK.  When
>     >     I run
>     >     > the test above I get a page saying the login has
>     failed.  None of the
>     >     > steps appear to fail until I try to validate the title of the
>     >     admin page.
>     >     >
>     >     > Thanks for any help.
>     >     >
>     >     > Ian
>     >     >
>     >     >
>     >
>     >     _______________________________________________
>     >     WebTest mailing list
>     >     WebTest@lists.canoo.com <mailto:WebTest@lists.canoo.com>
>     <mailto: WebTest@lists.canoo.com <mailto:WebTest@lists.canoo.com>>
>     >     http://lists.canoo.com/mailman/listinfo/webtest
>     >
>     >
> 
>     _______________________________________________
>     WebTest mailing list
>     WebTest@lists.canoo.com <mailto:WebTest@lists.canoo.com>
>     http://lists.canoo.com/mailman/listinfo/webtest
> 
>