On Thursday 10 November 2005 1:05 pm, Scott Escue wrote: > I have a JWebUnit test case in which I set the > username and password elements of a form, submit the > form, and then validate the title of the resulting > response page and verify that a Logoff link exists. > This works fine in my test environment, but when I run > the test case against my development server the form > submission apparently fails. The resulting response > after the form submission is the original login page, > I verified this by printing the text of the response. > However, I am able to login to the site in dev using > my browser with the same username and password > provided in the test case.
Are you using different web servers for each environment? Maybe there the response maybe returned in several different "pushes" to the client. Have you noticed a performance difference between the environments? Plus, I am only familair with the "cvs" version of jwebunit and not the 1.2 release. Which version of jwebunit are you using???? The CVS version uses either httpunit or jacobie http://jacobie.sf.net as the testing engine so I wasn't for sure which you are using. The main reason why is because I have seen so many problems with "javascript" support inside httpunit that some javascript pages never worked for me....that's why I integrated jacobie into jwebunit. Trying to Help..... See Ya, Nick Neuberger > I receive no errors other than the > AssertionFailedError stating that the Logoff link > cannot be found. I've triple-checked the html in each > environment to make sure it matches. The html source > is shown below. If anyone has any suggestions has to > how to track down the problem, they would be greatly > appreciated. > > > <script language="Javascript1.2"> > function checkBlank(){ > if (document.userid_form.elements[0].value == ""){ > if (document.userid_form.elements[1].value == ""){ > alert('Values for username and password fields are > required.'); > return false; > } > } > return true; > } > </script> > > <form action="/amserver/UI/Login" target="_parent" > onSubmit="return checkBlank()" > method=post name="userid_form" > enctype="application/x-www-form-urlencoded"> > <table border=0 cellpadding=0 cellspacing=0 > width="100%"> > <tbody> > > <tr> > <td align="center" colspan="2"> > <b>Member Login</b> > </td> > </tr> > > <tr> > <td align="left" nowrap width="1%"> > <b>Local Login</b> > </td> > > <td align="left" valign="bottom" width="99%"> > <hr size=1 color="#000000" noshade> > </td> > </tr> > > <tr> > <td nowrap align="right" width="1%"> > <label for="userId">user ID</label> > </td> > <td align="left" width="99%"> > > <input name="Login.Token1" size="15" > ID="userId"> > </td> > </tr> > > <tr> > <td align="right" width="1%"> > <label for="password">password</label> > </td> > <td align="left" width="99%"> > <input name="Login.Token2" size="15" > type="password" id="password"> > > </td> > </tr> > <tr><td colspan="2"></td></tr> > > > > <tr><td colspan="2"> </td></tr> > > <tr> > <td align="center" colspan="2"> > <input type="submit" name="Login" > value="Login"> > </td> > </tr> > > <tr><td colspan="2"> </td></tr> > > > > </tbody> > </table> > > <!-- For different auth methods, the below params must > be modified --> > <input type="hidden" name="module" value="Membership"> > > </form> > > > > __________________________________ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your very > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Jwebunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jwebunit-users -- Nick Neuberger Cell: 314-640-1123 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
