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
