- Revision
- 78
- Author
- mauro
- Date
- 2007-05-24 04:49:51 -0500 (Thu, 24 May 2007)
Log Message
Made selenium test properties configurable via profiles.
Modified Paths
- trunk/extensions/acceptance/pom.xml
- trunk/extensions/acceptance/src/test/java/org/waffle/taglib/acceptance/IntegrationTest.java
Diff
Modified: trunk/extensions/acceptance/pom.xml (77 => 78)
--- trunk/extensions/acceptance/pom.xml 2007-05-24 08:03:24 UTC (rev 77) +++ trunk/extensions/acceptance/pom.xml 2007-05-24 09:49:51 UTC (rev 78) @@ -1,171 +1,178 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.codehaus.waffle</groupId> - <artifactId>waffle-parent</artifactId> - <version>1.0-SNAPSHOT</version> - </parent> - <packaging>war</packaging> - <artifactId>waffle-acceptance</artifactId> - <name>Waffle Acceptance</name> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.codehaus.waffle</groupId> + <artifactId>waffle-parent</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <packaging>war</packaging> + <artifactId>waffle-acceptance</artifactId> + <name>Waffle Acceptance</name> - <dependencies> - <dependency> - <groupId>${pom.groupId}</groupId> - <artifactId>waffle</artifactId> - <version>${pom.version}</version> - </dependency> - <dependency> - <groupId>${pom.groupId}</groupId> - <artifactId>waffle-taglib</artifactId> - <version>${pom.version}</version> - </dependency> + <dependencies> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>waffle</artifactId> + <version>${pom.version}</version> + </dependency> + <dependency> + <groupId>${pom.groupId}</groupId> + <artifactId>waffle-taglib</artifactId> + <version>${pom.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <scope>compile</scope> + <version>2.0</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openqa.selenium.client-drivers</groupId> + <artifactId>selenium-java-client-driver</artifactId> + <version>0.9.2-SNAPSHOT</version> + <scope>test</scope> + </dependency> + </dependencies> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <scope>compile</scope> - <version>2.0</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jstl</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>taglibs</groupId> - <artifactId>standard</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.openqa.selenium.client-drivers</groupId> - <artifactId>selenium-java-client-driver</artifactId> - <version>0.9.2-SNAPSHOT</version> - <scope>test</scope> - </dependency> - </dependencies> + <build> + <plugins> - <build> - <plugins> + <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>maven-jetty-plugin</artifactId> + <configuration> + <scanIntervalSeconds>10</scanIntervalSeconds> + </configuration> + </plugin> - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>maven-jetty-plugin</artifactId> - <configuration> - <scanIntervalSeconds>10</scanIntervalSeconds> - </configuration> - </plugin> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <!--<version>0.3-SNAPSHOT</version>--> + <executions> + <execution> + <id>start-container</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + <configuration> + <wait>false</wait> + </configuration> + </execution> + <execution> + <id>stop-container</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + <configuration> + <wait>false</wait> + </configuration> + </execution> + </executions> + <configuration> + <container> + <containerId>jetty6x</containerId> + <type>embedded</type> + </container> + <deployables> + <deployable> + <properties> + <context>waffle</context> + </properties> + <pingURL>http://localhost:8080/cargocpc/index.html</pingURL> + </deployable> + </deployables> + </configuration> + </plugin> - <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <!-- <version>0.3-SNAPSHOT</version>--> - <executions> - <execution> - <id>start-container</id> - <phase>pre-integration-test</phase> - <goals> - <goal>start</goal> - </goals> - <configuration> - <wait>false</wait> - </configuration> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - <configuration> - <wait>false</wait> - </configuration> - </execution> - </executions> - <configuration> - <container> - <containerId>jetty6x</containerId> - <type>embedded</type> - </container> - <deployables> - <deployable> - <properties> - <context>waffle</context> - </properties> - <pingURL> - http://localhost:8080/cargocpc/index.html - </pingURL> - </deployable> - </deployables> - </configuration> - </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>selenium-maven-plugin</artifactId> + <version>1.0-beta-1</version> + <executions> + <execution> + <id>start-selenium</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start-server</goal> + </goals> + <configuration> + <background>true</background> + </configuration> + </execution> + </executions> + </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>selenium-maven-plugin</artifactId> - <version>1.0-beta-1</version> - <executions> - <execution> - <id>start-selenium</id> - <phase>pre-integration-test</phase> - <goals> - <goal>start-server</goal> - </goals> - <configuration> - <background>true</background> - </configuration> - </execution> - </executions> - </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <testFailureIgnore>true</testFailureIgnore> + <skip>true</skip> + </configuration> + <executions> + <execution> + <id>run integration tests</id> + <phase>integration-test</phase> + <goals> + <goal>test</goal> + </goals> + <configuration> + <skip>false</skip> + <systemProperties> + <property> + <name>seleniumBrowserString</name> + <value>*firefox ${firefox.bin}</value> + </property> + <property> + <name>seleniumContextPath</name> + <value>/${pom.artifactId}-${pom.version}/</value> + </property> + </systemProperties> + <includes> + <include>**/acceptance/**/*Test.java</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <testFailureIgnore>true</testFailureIgnore> - <skip>true</skip> - </configuration> - <executions> - <execution> - <id>run integration tests</id> - <phase>integration-test</phase> - <goals> - <goal>test</goal> - </goals> - <configuration> - <skip>false</skip> - <includes> - <include> - **/acceptance/**/*Test.java - </include> - </includes> - </configuration> - </execution> - <execution> - <id>run unitary tests</id> - <phase>test</phase> - <goals> + <properties> + <firefox.bin>/usr/lib/firefox/firefox-bin</firefox.bin> + </properties> - <goal>test</goal> - </goals> - <configuration> - <skip>false</skip> - <includes> - <include> - **/utest/**/*Test.java - </include> - </includes> - </configuration> - </execution> - </executions> - </plugin> + <profiles> + <profile> + <id>macosx</id> + <activation> + <os> + <name>Mac OS X</name> + </os> + </activation> + <properties> + <firefox.bin>/Applications/Firefox.app/Contents/MacOS/firefox-bin</firefox.bin> + </properties> + </profile> - </plugins> - </build> + </profiles> </project>
Modified: trunk/extensions/acceptance/src/test/java/org/waffle/taglib/acceptance/IntegrationTest.java (77 => 78)
--- trunk/extensions/acceptance/src/test/java/org/waffle/taglib/acceptance/IntegrationTest.java 2007-05-24 08:03:24 UTC (rev 77) +++ trunk/extensions/acceptance/src/test/java/org/waffle/taglib/acceptance/IntegrationTest.java 2007-05-24 09:49:51 UTC (rev 78) @@ -3,7 +3,7 @@ import com.thoughtworks.selenium.SeleneseTestCase; /** - * A basic integration test class that runs all tests in firefox. + * A basic integration test class that runs all tests in browser * * @author Guilherme Silveira * @author Nico Steppat @@ -11,13 +11,14 @@ */ public abstract class IntegrationTest extends SeleneseTestCase { - public void setUp() throws Exception { - setUp("http://localhost:8080", "*firefox /usr/lib/firefox/firefox-bin"); - // setUp("http://localhost:8080", "*konqueror /usr/bin/konqueror"); + public void setUp() throws Exception { + String browserString = System.getProperty("seleniumBrowserString"); + setUp("http://localhost:8080", browserString); } protected void open(String url) { - selenium.open("/waffle-acceptance-1.0-SNAPSHOT/" + url); + String contextPath = System.getProperty("seleniumContextPath"); + selenium.open(contextPath + url); selenium.waitForPageToLoad("2000"); }
To unsubscribe from this list please visit:
