Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

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.

Posted in Java at Dec 08 2006, 05:04:55 PM MST 6 Comments
Comments:

Wow. We did it a completely different way. We used selenium outside of the build process. Mainly after we deploy and execute our selenium tests on an integration server.

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 #

I strongly recommend that you consider using Selenium Remote Control. We use it with the provided Java wrapper API and write our tests in JUnit (or you could equally use TestNG). This is terrific because you can set up your test fixture data directly (e.g. via your domain objects). We use the same 'test helper' classes to set up fixture data that we use for all our non-UI JUnit system tests.

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 #

I have written a (long-ish) blog post on using Selenium Remote Control, TestNG, Cargo and Maven. You might find it useful.

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 #

mavenium is about what I have found useful from my own experience: create integration tests to be used in a continuous integration environment in the simplest (in terms of maintenance and configuration), way.

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 #

[Trackback] There were some questions in the mailing list and Matt Raible blog about using Selenium with Maven 2. These are the available solutions: selenium-maven-plugin We use it for Continuum integration tests , it...

Posted by Carlos Sanchez's Weblog on December 14, 2006 at 02:27 PM MST #

You can find a plugin for Maven 2 here:

http://mojo.codehaus.org/selenium-maven-plugin/

Posted by Jason Dillon on February 24, 2007 at 10:46 AM MST #

Post a Comment:
  • HTML Syntax: Allowed