Selenium Plugin for Maven
On the Maven users mailing list, Mick Knutson recently posted a question asking if there's a Maven 2 plugin for Selenium. Since we're hoping to move from Canoo WebTest to Selenium for AppFuse, this piqued my interest. It looks like the Geronimo guys have created a plugin and they run their Selenium tests from TestNG. While another user agrees, Wendy Smoak recommends following what Shale does.
While these solutions sound doable, David Santiago Turiño seems to suggest the best solution: Mavenium. The main limitation of Mavenium seems to be it only supports HTML-based tests. Since I expect most AppFuse users to generate their tests using the Selenium IDE, I doubt this will be an issue.
Is anyone using this plugin? If so, do you think it's the best way to integrate Selenium into AppFuse? We'd like to implement the most popular and easiest to use mechanism.
Here is our set up. Tester saves the test from the selenium-ide to some folder (linked to cvs of course) and as a java export (I am underway modifying the ide to save the files as both html and java as the translater code in the rc is not as good (just look for your self)). Basically a dual head save just easier on our tester (bless her).
Have a spring config that sets up the site undertest and what test(s) to perform or not test as you might not be ready to test some pages.
The saved java files get compiled on the fly (we used bcel first but are now using eclipse compiler) then that test gets executed logs the run. If it fails we capture the offending web page with the selenium error.
Come in the next day and check to see if tests pass or fail.
There are some more moving pieces. Feel free to discuss.
PS: After reviewing the Site Mesh site and examples it still seems to me like more work and maintenance for a coder but it is an excellent idea.
Posted by doyle on December 09, 2006 at 04:50 AM MST #
With Selenium-RC you can include all our web UI tests in your continuous integration cycle. We've got Cruise Control set-up to run all the Selenium tests in IE and then in Firefox.
Because Selenium-RC includes a proxy server ('Selenium Server') there's no cross-site scripting security issue to stop you testing web pages in other domains (should you need to do that).
Selenium-IDE can still be useful to write the first draft of a new test (and then port to Java), but once you've developed some Selenium expertise it's easy enough to author new tests directly in Java.
Posted by Beagley on December 09, 2006 at 06:31 PM MST #
If you are pressed for time, you can quickly skim over the steps, grab the example archive I have uploaded, and look through the sources of the last step.
Posted by Binil Thomas on December 09, 2006 at 07:41 PM MST #
Me, as a user, prefer to "develop" my UI tests with a tool like Selenium-IDE than coding them in Java classes. Furthermore, whenever the UI changes, I found quite more easy to update the existing tests with the help of such a tool than firing Eclipse and start coding (although it could become something simple with practise,yes...). I tried JWebUnit in the past and when I saw Selenium-IDE in action, the choice was clear for me.
In the background, mavenium is using Selenium-RC to run the tests, another tester superb tool.
I would like to make it even easier to configure in terms of dependencies and make it able to produce "Surefireable" test reports, which is something that seems to be demanded and I would like to see in my CC reports.
David
Posted by David Santiago on December 09, 2006 at 11:29 PM MST #
Posted by Carlos Sanchez's Weblog on December 14, 2006 at 02:27 PM MST #
http://mojo.codehaus.org/selenium-maven-plugin/
Posted by Jason Dillon on February 24, 2007 at 10:46 AM MST #