Created
January 8, 2012 20:51
-
-
Save krimple/1579641 to your computer and use it in GitHub Desktop.
Setting up Selenium WebDriver, Jetty and the Maven Failsafe plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
... | |
<!-- install the WebDriver API --> | |
<dependency> | |
<groupId>org.seleniumhq.selenium</groupId> | |
<artifactId>selenium-java</artifactId> | |
<version>2.16.1</version> | |
<scope>test</scope> | |
</dependency> | |
... | |
</dependencies> | |
<build> | |
... | |
<plugin> | |
<groupId>org.mortbay.jetty</groupId> | |
<artifactId>jetty-maven-plugin</artifactId> | |
<version>8.1.0.RC2</version> | |
<configuration> | |
<scanIntervalSeconds>10</scanIntervalSeconds> | |
<stopKey>stop</stopKey> | |
<stopPort>9999</stopPort> | |
<webAppConfig> | |
<contextPath>/${project.name}</contextPath> | |
</webAppConfig> | |
</configuration> | |
<executions> | |
<execution> | |
<id>start-jetty</id> | |
<goals> | |
<goal>run</goal> | |
</goals> | |
<phase>pre-integration-test</phase> | |
<configuration> | |
<scanIntervalSeconds>0</scanIntervalSeconds> | |
<daemon>true</daemon> | |
</configuration> | |
</execution> | |
<execution> | |
<id>stop-jetty</id> | |
<goals> | |
<goal>stop</goal> | |
</goals> | |
<phase>post-integration-test</phase> | |
<configuration> | |
<stopKey>stop</stopKey> | |
<stopPort>9999</stopPort> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
... | |
<!-- failsafe runs integration tests, ending or | |
starting with IT. --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-failsafe-plugin</artifactId> | |
<version>2.8.1</version> | |
<executions> | |
<execution> | |
<id>integration-test</id> | |
<goals> | |
<goal>integration-test</goal> | |
</goals> | |
<configuration> | |
<includes> | |
<!-- add other patterns not included with | |
standard tests. --> | |
<include>**/IT*</include> | |
</includes> | |
</configuration> | |
</execution> | |
<execution> | |
<id>verify</id> | |
<goals> | |
<goal>verify</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
... | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment