Hi, Julien

Thank for for the draft article. I've read through it. My personal
experience is that taking the maven-jetty-plugin and/or Cargo route is
the roundabout way of doing JWebUnit with Jetty. You can actually
directly instantiate Jetty in your setup-method.

Here is a code example:
http://svn.brodwall.com/demo/insanejava/trunk/web-integration-testing/src/test/java/no/brodwall/insanejava/webintegration/WebIntegrationTest.java

As the example should demonstrate, this actually also lets you fish
around with the internals of the web application. I have found this
useful for inserting mocks etc.

I like the fact that you're thorough with the Maven 2 part in the
article, however.

If you would like, you could link to, or get a copy of my introduction
to using Jetty + JWebUnit. Here is the brief-brief version:
http://www.brodwall.com/johannes/blog/2006/12/10/in-process-web-integration-tests-with-jetty-and-jwebunit/

I also have a tutorial version
(http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/).

If you like, I can make a two page jump-start version as well.

Re commons-logging: It seems like it is only barely used in jwebunit
itself. May I suggest that it is usually inappropriate for a testing
library to be logging on its own?


~Johannes

On 1/24/07, Julien HENRY <[EMAIL PROTECTED]> wrote:
> Hi Johannes,
>
> Concerning commons-logging, I know their pom is broken, and I tried to fix 
> this by removing extra dependencies (will be in next RC).
>
> I join my draft as a .doc (usually I prefer OpenOffice, but I have to use MS 
> Word at the office).
>
> ++
>
> Julien
>
> ----- Message d'origine ----
> De : Johannes Brodwall <[EMAIL PROTECTED]>
> À : Usage problems for JWebUnit <[email protected]>
> Envoyé le : Mercredi, 24 Janvier 2007, 10h51mn 43s
> Objet : Re: [JWebUnit-users] Re : Article on JWebUnit, Jetty, Spring-MVC and 
> Hibernate + Kudos + Request
>
> Hi, Julien
>
> Thank you for the feedback. I would also be very interested in reading
> your draft article if you'd like a second pair of eyes.
>
> I tried upgrading to JWebUnit to 1.4, but the error messages didn't
> improve. It took me a few minutes to figure out that I needed the
> dependency on jwebunit-htmlunit-plugin instead of just jwebunit).
>
> However; when tried running my tests, I got a few classpath issues
> with commons-logging. This has happened extremely frequently the last
> 6 months or so, and I've found that I have to get rid of
> commons-logging from my codebase to keep stuff stable. (See my blog
> article about this for more info:
> http://www.brodwall.com/johannes/blog/2007/01/20/commons-logging-youre-on-notice/
>
> Can we get rid of commons-logging?
>
>
> ~Johannes
>
> On 1/21/07, Julien HENRY <[EMAIL PROTECTED]> wrote:
> > Hi Johannes,
> >
> > Good idea to write such an article. I wrote a draft article about JWebUnit 
> > + Jetty + Maven 2 one month ago, but I don't have time (and competences) to 
> > finish it.
> >
> > I will take a look on your article and try to give you feedback. But I'm 
> > not an expert of Spring, so don't expect me to help you on this point.
> >
> > Concerning "make WebTestCase abstract", I agree with you. I will fix that 
> > in 1.4-RC4.
> >
> > Concerning error messages, I think some improvements were done since 1.2. 
> > You should definitly switch to 1.4 ASAP for your article, since final 
> > release should be out before february if no major issue is found in latest 
> > changes.
> > Moreover, JWebUnit 1.2 was based on old HttpUnit, and we are now using 
> > HtmlUnit behind the scene, with a much better JavaScript support.
> >
> > ++
> >
> > Julien
> >
> > ----- Message d'origine ----
> > De : Johannes Brodwall <[EMAIL PROTECTED]>
> > À : [email protected]
> > Envoyé le : Dimanche, 21 Janvier 2007, 21h12mn 58s
> > Objet : [JWebUnit-users] Article on JWebUnit, Jetty, Spring-MVC and 
> > Hibernate + Kudos + Request
> >
> > Hi,
> >
> > I am writing an article that I hope to get published. The article is
> > on test-driving the development of a web application using Spring-MVC,
> > FreeMarker and Hibernate. The basic trick consists of starting Jetty
> > as part of the test setup and using JWebUnit to test the web pages.
> >
> > I would love any input on the article, or just that someone got
> > something useful out of my work here. The article is posted at
> > http://www.brodwall.com/johannes/blog/2007/01/20/article-ready-for-edit-embedded-web-integration-testing-with-jetty/
> >
> > JWebUnit is great for this kind of work.
> >
> > In the process of working on the article, and working with JWebUnit in
> > general, I have noticed two annoyances that could be improved with
> > JWebUnit changes:
> >
> > First: When I run my tests in Eclipse, I want to run all the tests in
> > a package. For some reason, Eclipse thinks it is a good idea to
> > include WebTestCase as part of the collected test suite. This means
> > that the tests fail with the warning "No tests found in
> > ...WebTestCase". This could be fixed by making WebTestCase abstract.
> > (It seems like this was debated,
> > https://sourceforge.net/tracker/?func=detail&atid=497985&aid=735092&group_id=61302,
> > but never executed?)
> >
> > Second, and more importantly, when a JWebUnit test fails, I usually
> > have very little idea of why. I have to fire up my trusted web browser
> > to find out. This slows me down, and makes it harder to test-drive
> > applications with JWebUnit. By making assertion errors more verbose,
> > this would be improved.
> >
> > As a minimum, assertTextInElement should emit "expected [foo], but was
> > [bar]". assertTextInPage and assertTextInTable could print out the
> > whole page, but this is of course a more problematic decision.
> > Alternatively, assertElementEquals could be added in addition to
> > assertTextInElement.
> >
> > (I am using jwebunit 1.2, which is the latest good, non-rc version in
> > Maven repository)
> >
> >
> > Thanks,
> > ~Johannes
> >
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> JWebUnit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
> Profitez des connaissances, des opinions et des expériences des internautes 
> sur Yahoo! Questions/Réponses
> http://fr.answers.yahoo.com
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> JWebUnit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to