Skip to end of metadata
Go to start of metadata

Using Selenium for functional testing of webapps, with Maven

The following profile comes from the parent pom for the Apache Shale example apps.

See this page for more information:

With Maven 2.0.4, putting both plugin executions in the process-resources phase did not work-- they were executed in the wrong order and so the build failed as Selenium had not yet been unzipped when antrun tried to copy the files. Moving the dependency-maven-plugin execution to generate-sources fixed the problem, but this should not have been necessary. See

                        <copy todir="${}/${artifactId}/selenium/core">
                           <fileset dir="${}/selenium/core"/>
                        <copy todir="${}/${artifactId}/selenium/tests">
                           <fileset dir="${basedir}/src/test/selenium"/>

Using Selenium Maven Plugin and Cargo

Tutorial at Functional testing with Maven, Cargo and Selenium by Carlos Sanchez

Examples at Continuum web tests, Archiva web tests, and the Maven Web UI Tests.

  • No labels


  1. There is a simple plugin that lets you use Selenium-IDE HTML tests in your maven webapp project and integrates in maven's build life cycle, stopping it whenever a test fails.

    Upload to the maven central repository pending.

  2. FYI, you can find a Maven2 plugin for starting up a selenium server here