What is the recommended method for integrating Selenium into a Maven build?

For most use-cases, the recommended method for integrating Selenium into a Maven build is to create TestNG (or JUnit) test-cases written in Java (or Groovy) and use the Selenium-RC API to send browser requests to a Selenium server previously started with the selenium:start-server goal.

One significant advantage to this technique is that the existing maven-surefire-plugin can be used to integrate the test invocation and generate a nice report. Java-based (or Groovy-based) tests also provide significantly more options to validate results. And you can still use the Selenium IDE to generate the basic code, you just need to change the format language (Options :: Format :: Java) to Java and then cut and paste into a typical JUnit/TestNG test.

[top]