Hi Julien, I have now progressed in solving the issue, but I think it will be a long way before everything is working!
First, I was running JBoss from inside IDEA and this definitely don't work. I don't know why, and I have no time to investigate this. Running JBoss outside of IDEA is OK. I experienced the same thing with an EJB remote client. Running the server and the client inside IDEA gives erratic results. Then, I realized that there are many other problems on the way: - HtmlUnit is much less tolerant than most browsers, some I had to rewrite some code in a cleaner way. - There is a problem with Javascript. Either HtmlUnit run the scripts on loading them, or it is something else, but I had to change the scripts to test navigator.userAgent for null before calling any method on this. - Now, I am facing a new problem with string comparison because JBoss/Wicket is sending UTF8 encoded Strings and the comparison with Java ISO-LATIN strings fail. Pierre-Yves Julien HENRY a écrit : > Hi Pierre-Yves, > > You're right, it's better to use english. > > I don't know JBoss, but could you please check if your tests are well > isolated. I mean that HtmlUnit uses a given version of HttpClient, and > JBoss could perhaps provide another one that make a conflict. Check your > classpath. > > ++ > > Julien > > ----- Message d'origine ---- > De : Pierre-Yves Saumont <[EMAIL PROTECTED]> > À : [email protected] > Envoyé le : Mercredi, 6 Septembre 2006, 10h24mn 23s > Objet : Re: [Jwebunit-users] Re : result of assertTitleEquals does not > match result of dumpHtml > > Bonjour, > > J'ai bien du mal a démêler tout ça. J'ai essayé de réduire le code au > maximum pour faire un exemple, mais il semble qu'il y ait plusieurs > erreur cumulées. > > J'utilise jWebUnit 1.3 sous IDEA avec le Wicket sous JBoss. > > Pour la page de test que j'ai faite, tout marche bien si elle est servie > statiquement par Apache. En revanche, avec Wicket/JBoss, j'obtiens : > > junit.framework.AssertionFailedError: Method failed due to Exception > Thrown: > net.sourceforge.jwebunit.exception.TestingEngineResponseException: > com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 404 > /ceagrap/app for http://localhost:8080/ceagrap/app > > > alors que l'adresse http://localhost:8080/ceagrap/app fonctionne bien > dans le navigateur. Il doit y avoir un traitement de l'erreur 404 > quelque part entre le navigateur, JBoss et Wicket ! > > Je continue de chercher soit pour trouver l'erreur, soit pour faire un > exemple qui la reproduise. > > a+ > > Pierre-Yves > > PS: Ca ne pose pas de problème d'écrire en français sur cette liste ? > > Julien HENRY a écrit : > > Salut, > > > > C'est vraiment étrange, on dirait qu'une exception s'est déclenchée, > > mais qu'elle se retrouve dans la comparaison au lieu de faire planter le > > test. > > Quelle version de jWebUnit utilises-tu ? Est-ce que tu travailles avec > > ou sans Maven ? > > > > Peux-tu me donner le code HTML et le code Java minimum qui reproduise ce > > bug ? > > > > Merci > > > > ++ > > > > Julien > > > > ----- Message d'origine ---- > > De : Pierre-Yves Saumont <[EMAIL PROTECTED]> > > À : [email protected] > > Envoyé le : Dimanche, 3 Septembre 2006, 1h51mn 44s > > Objet : [Jwebunit-users] result of assertTitleEquals does not match > > result of dumpHtml > > > > Hello, > > > > assertTitleEquals("My Title") fails with the following message: > > > > junit.framework.ComparisonFailure: > > Expected :My Title > > Actual : > > at > > net.sourceforge.jwebunit.WebTester.assertTitleEquals(WebTester.java:198) > > > > although when I use dumpHtml, the html is correct: > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22>; > > <http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%22>;> > > > > <html> > > > > <head> > > <span> > > <meta http-equiv="Content-Type" content="text/html; > > "/> > > <title>My Title</title> > > > > > > Any idea ? > > > > Thanks, > > > > Pierre-Yves > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>> > > _______________________________________________ > > Jwebunit-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/jwebunit-users > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642> > _______________________________________________ > Jwebunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jwebunit-users > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Jwebunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jwebunit-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jwebunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jwebunit-users
