Re: [Wicket-user] Test Frameworks and Wicket
On Sat, 10 Feb 2007, nilo de roock wrote: like to use for writing a functional regressing test. But I don't think WicketTester was meant for that in the first place, more as a TestCase helper. I suppose Wicket still needs more whitepapers, tutorials, books, For me, WicketTester works best for low-level whitebox developer testing of individual components or interactions between a couple of components. I have experienced the abstraction leaking a bit (in 2.0) and being unable to test some things, such as some ajax functionality. (These I just test with Wicket Bench then, see below.) At the end of the day a user receives html and javascript a point where it should be invisible wether this has been generated by either Wicket or plain vanilla Servlets. I have been looking at some test frameworks. I have no experience with either of them, but Canoo WebTest looks to what I had in mind. As WebTest is based on HttpUnit / HtmlUnit, it suffers from their limitations, the greatest of which I think is the fact that it uses non-browser javascript implementation. The last time I used HttpUnit (jWebUnit really) a couple of years back, I just had to turn javascript off as it choked, though I have heard that it would have improved since then. jWebUnit is a nice higher-level abstraction layer on top of HttpUnit, but still doing everything with java as opposed to XML (WebTest). I find Selenium RC a lot more promising for this stuff http://svn.openqa.org/fisheye/viewrep/~raw,r=HEAD/selenium-rc/trunk/clients/java/src/test/java/com/thoughtworks/selenium/GoogleTest.java and with Wicket Bench (WicketBenchTestCase), you can use it to test-drive individual Wicket components against a real browser http://svn.laughingpanda.org/svn/wicket-bench/trunk/wicket-bench-test/src/test/java/test/DictionaryPanelTest.java This complements WicketTester nicely. With Selenium IDE, you can record Selenium RC java (or other language) code, which is good for the cases when you can't figure out what kind of Selenium code would emulate the user interaction you want. - Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Test Frameworks and Wicket
I had a brief look at the WicketTester example. It's not something I would like to use for writing a functional regressing test. But I don't think WicketTester was meant for that in the first place, more as a TestCase helper. I suppose Wicket still needs more whitepapers, tutorials, books, articles, the lot. ;-) At the end of the day a user receives html and javascript a point where it should be invisible wether this has been generated by either Wicket or plain vanilla Servlets. I have been looking at some test frameworks. I have no experience with either of them, but Canoo WebTest looks to what I had in mind. HttpUnit, written in Java, emulates the relevant portions of browser behavior, including form submission, JavaScript, basic http authentication, cookies and automatic page redirection, and allows Java test code to examine returned pages either as text, an XML DOM, or containers of forms, tables, and links. When combined with a framework such as JUnit, it is fairly easy to write tests that very quickly verify the functioning of a web site. ( ServletUnit, which is included in the HttpUnit download, makes it possible to test and develop servlets using the same techniques used to test web sites without a servlet container using ServletUnit. ) http://www.httpunit.org/ HtmlUnit is a java unit testing framework for testing web based applications. It is similar in concept to httpunit but is very different in implementation. Which one is better for you depends on how you like to write your tests. HttpUnit models the http protocol so you deal with request and response objects. HtmlUnit on the other hand, models the returned document so that you deal with pages and forms and tables. http://htmlunit.sourceforge.net/ Canoo WebTest is a tool for XP style acceptance testing of web applications. It calls web pages and verifies the result against expected properties. There are engines for both HttpUnit and HtmlUnit. Tests are described in terms of ANT scripts. Test reporting is done via XML/XSLT. Canoo also supports Groovy and is the de facto tool for Grails. http://webtest.canoo.com/ JWebUnit provides a high-level API for navigating a web application combined with a set of assertions to verify the application's correctness. This includes navigation via links, form entry and submission, validation of table contents, and other typical business web application features. JWebUnit 1.x is based on HtmlUnit. The dev 2.x also supports Selenium. http://jwebunit.sourceforge.net/ Any comments, ideas? -nilo P.S. Jython based but cool, and it actually works http://maxq.tigris.org/ -- View this message in context: http://www.nabble.com/-Wicket-user--Test-Frameworks-and-Wicket-tf3205798.html#a8902211 Sent from the Wicket - User mailing list archive at Nabble.com. - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Test Frameworks and Wicket
Hi Nilo, I would go all the way and use Selenium for functional regression tests. Selenium tests are easy to produce with the excellent Firefox extension SeleniumIDE. The tests can then be run in IE, Firefox and a couple of other browsers. Some can be started automatically from a CI server. Regards, Erik. nilo de roock wrote: I had a brief look at the WicketTester example. It's not something I would like to use for writing a functional regressing test. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - 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=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user