Automated testing of Wicket applications

2008-09-12 Thread Jan Stette
This is a bit of a general question: I'd be interested in hearing about how people do automated tests of their Wicket applications. I'm thinking about system tests of the full application, not unit tests. There are of course tools like Selenium which let you automate actions on a web

Re: Automated testing of Wicket applications

2008-09-12 Thread German Morales
Hi Jan, We are using Watir, which lets you write tests in ruby. And we are using mainly wicket generated names for identification of components, but sometimes we use generated attributes too (for example a does not have name), or just the text in the html. Since the code is all in ruby, it is

Re: Automated testing of Wicket applications

2008-09-12 Thread Peter Thomas
On Fri, Sep 12, 2008 at 8:12 PM, German Morales [EMAIL PROTECTED]wrote: Hi Jan, We are using Watir, which lets you write tests in ruby. For those who don't want to use Ruby, Watij is the Java equivalent of Watir. http://watij.com/ But the problem with both Watij and Watir is that you have

Re: Automated testing of Wicket applications

2008-09-12 Thread German Morales
Actually there are more platforms for watir ( http://wtr.rubyforge.org/platforms.html): FireWatir and SafariWatir. I gave a quick try to FireWatir some time ago, with no much success, but they continue working on it. They mention also a Watir interface that uses Selenium. 2008/9/12 Peter

Re: Automated testing of Wicket applications

2008-09-12 Thread Jan Stette
Hi German, thanks for an interesting reply. Ruby probably wouldn't be appropriate in our environment, but it's still interesting to see the principles involved in writing tests using it. Some points I'm not clear about: When Wicket generates pages, as far as I can tell, the wicket:id that's

Re: Automated testing of Wicket applications

2008-09-12 Thread Jan Stette
Thanks Peter, those are interesting links. As for the question I asked of German as well, are you able to get the full wicket path for components, or just the local wicket:ids? If the latter, how do you deal with components that can be instantiated multiple times on a page? Also, have you

Re: Automated testing of Wicket applications

2008-09-12 Thread Pointbreak
Also, have you successfully tested Ajax applications using Selenium-RC and Junit? I have, and Selenium works really well for testing wicket ajax applications. Only thing I had to do was to add a script to the pages that helps selenium figure out when ajax requests are finished. See this

Re: Automated testing of Wicket applications

2008-09-12 Thread German Morales
2008/9/12 Jan Stette [EMAIL PROTECTED] Hi German, thanks for an interesting reply. Ruby probably wouldn't be appropriate in our environment, but it's still interesting to see the principles involved in writing tests using it. Some points I'm not clear about: When Wicket generates pages,

Re: Automated testing of Wicket applications

2008-09-12 Thread Igor Vaynberg
we can always make it so there is a setting that outputs the full path as an attribute of a component if that is helpful. eg div wicket:path=some:path:to:this:div -igor On Fri, Sep 12, 2008 at 12:18 PM, German Morales [EMAIL PROTECTED] wrote: 2008/9/12 Jan Stette [EMAIL PROTECTED] Hi

Re: Automated testing of Wicket applications

2008-09-12 Thread James Carman
That might be pretty cool! I can see how that might help constructing your unit tests. On Fri, Sep 12, 2008 at 5:03 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: we can always make it so there is a setting that outputs the full path as an attribute of a component if that is helpful. eg div

Re: Automated testing of Wicket applications

2008-09-12 Thread Igor Vaynberg
open a jira issue and we can whip it up -igor On Fri, Sep 12, 2008 at 2:54 PM, James Carman [EMAIL PROTECTED] wrote: That might be pretty cool! I can see how that might help constructing your unit tests. On Fri, Sep 12, 2008 at 5:03 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: we can always

Re: Automated testing of Wicket applications

2008-09-12 Thread Jan Stette
That sounds very promising, thanks! Jan 2008/9/12 Pointbreak [EMAIL PROTECTED][EMAIL PROTECTED] Also, have you successfully tested Ajax applications using Selenium-RC and Junit? I have, and Selenium works really well for testing wicket ajax applications. Only thing I had to do was to

Re: Automated testing of Wicket applications

2008-09-12 Thread James Carman
Done: https://issues.apache.org/jira/browse/WICKET-1830 If you don't mind, I'd like to take a stab at this. I can submit a patch. Do you want me to develop it against trunk or the 1.3 branch? I assume you want this to be optional in development mode so that we don't screw up all of the

Re: Automated testing of Wicket applications

2008-09-12 Thread Jan Stette
Ah sorry, you must have beat me to it by seconds! https://issues.apache.org/jira/browse/WICKET-1831 I'll close mine off as a dupe... With regards to scheduling, it would be really great to have this in 1.3.5 if it's not a big change. Thanks, Jan 2008/9/13 James Carman [EMAIL PROTECTED]

Re: Automated testing of Wicket applications

2008-09-12 Thread Igor Vaynberg
go for it if you want, its a 5 minute thing anyways. and yes, there should be a setting that is off by default in both dev and prod modes. -igor On Fri, Sep 12, 2008 at 4:04 PM, James Carman [EMAIL PROTECTED] wrote: Done: https://issues.apache.org/jira/browse/WICKET-1830 If you don't mind,