> > For this type of integration testing I would reccomend using selenium. > > (tacos uses this currently ) > > That's what I was thinking. I'll give it a go. I'm a bit hesitant since > when I last looked (back in November), the documentation was absolutely > atrocious.
We're just starting to use Selenium at the moment, so I'll just share a couple of things you might find useful. One of the problems I found with "Plain" selenium is that you can't organise your tests into multiple suites or suites of suites very easily. So I'm not convinced how well it scales as you write more and more tests. It's also has some limitations if you want to do complex tests on the page (e.g. involving loops or conditions). So, I very quickly started using Selenium RC (http://www.openqa.org/selenium-rc/) which uses the Selenium engine but lets you write tests in Java (and other languages) using JUnit or similar. This is neat because you can use the usual JUnit things to organise your tests and you have the full power of Java to execute test logic. Selenium is not as good as HTMLUnit at allowing you to get at pieces of your page easily - you quite often need to use the getEval() method to execute JavaScript in the page that extracts what you want and returns it. Currently we have a subclass of the "DefaultSelenium" class into which we're adding lots of helper methods for examining pages. One other thing is that the "Selenium" object that represents your session is very expensive to create (it requires creating an instance of the web browser). You can use JUnit setUp/tearDown around a suite so that you only create it once (or use @BeforeClass/@AfterClass in Junit 4). However, I've found that with @BeforeClass/@AfterClass you have suite==class and all your tests for the session need to be in one class. I've found that TestNG's concept of a suite is much more suitable as it can span multiple classes and you can its 'groups' concept to run subsets of the tests (http://testng.org/). Hope that's useful, Paul ------------------ Paul Field Global Markets Research IT Deutsche Bank --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]