diff options
author | Wendy Smoak <wsmoak@apache.org> | 2009-05-02 00:11:22 +0000 |
---|---|---|
committer | Wendy Smoak <wsmoak@apache.org> | 2009-05-02 00:11:22 +0000 |
commit | 6f0984adf36c491d7556101cc8d8e65605849ea8 (patch) | |
tree | 0bde216402d63d9dff3dc481e193d2341d9f613f /archiva-modules | |
parent | c2c281cddeaded30bb978031f2f1a1fc8a741a9e (diff) | |
download | archiva-6f0984adf36c491d7556101cc8d8e65605849ea8.tar.gz archiva-6f0984adf36c491d7556101cc8d8e65605849ea8.zip |
[MRM-1164] Move Cargo plugin config into a profile which is active by default. To run TestNG tests against an existing Archiva instance, use -Dcontainer=existing.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@770866 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt | 5 | ||||
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml | 324 |
2 files changed, 178 insertions, 151 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt b/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt index aa634ef85..64702d56d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt +++ b/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt @@ -1,9 +1,12 @@ ReadMe ---------- Run selenium tests in src/test/testng with Maven and TestNG + - mvn clean install -f testng-pom.xml + +Run Selenium tests in src/test/testng against an existing Archiva instance - Start Archiva - Configure admin user for archiva (match values in src/test/resources/testng.properties ) - modify src/test/resources/testng.properties as needed - - mvn clean install -f testng-pom.xml + - mvn clean install -f testng-pom.xml -Dcontainer-existing For the default values in the scripts, to pass all the tests, you need to add an artifact in internal repository. diff --git a/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml index 9ad35e62f..645d9e5cc 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml @@ -125,110 +125,6 @@ </executions> </plugin> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>dependency-maven-plugin</artifactId> - <executions> - <execution> - <id>unzip-archiva-webapp</id> - <phase>generate-resources</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>archiva-webapp</artifactId> - <version>${project.version}</version> - <type>war</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory> - </configuration> - </execution> - <execution> - <id>prepare-provided-dependencies</id> - <phase>generate-resources</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <includeGroupIds>org.apache.derby,javax.mail,javax.activation</includeGroupIds> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <excludeTransitive>false</excludeTransitive> - <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <copy todir="${project.build.directory}/appserver-base"> - <fileset dir="src/test/it-resources/appserver-base" /> - </copy> - <copy todir="${project.build.directory}/repository"> - <fileset dir="src/test/it-resources/repository" /> - </copy> - <copy todir="${project.build.directory}/index"> - <fileset dir="src/test/it-resources/index" /> - </copy> - <copy todir="${project.build.directory}/snapshots"> - <fileset dir="src/test/it-resources/snapshots" /> - </copy> - <copy todir="${project.build.directory}/projects"> - <fileset dir="src/test/it-resources/projects" /> - </copy> - <copy todir="${project.build.directory}/local-repo"> - <fileset dir="src/test/it-resources/local-repo" /> - </copy> - </tasks> - </configuration> - </execution> - <execution> - <id>copy-container-conf</id> - <phase>package</phase> - <configuration> - <tasks> - <copy todir="${project.build.directory}/${container.name}conf"> - <fileset dir="src/test/${container.name}" /> - </copy> - <copy - todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.26/apache-tomcat-5.5.26/common/lib"> - <fileset dir="${project.build.directory}/providedDependencies"> - <include name="**/*.jar" /> - </fileset> - </copy> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - <execution> - <id>check-archiva-loaded</id> - <phase>integration-test</phase> - <configuration> - <tasks> - <get src="http://localhost:9696/archiva/" dest="${project.build.directory}/index.html" /> - <delete file="${project.build.directory}/index.html" /> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> @@ -262,51 +158,6 @@ </configuration> </plugin> <plugin> - <groupId>org.codehaus.cargo</groupId> - <artifactId>cargo-maven2-plugin</artifactId> - <version>1.0</version> - <executions> - <execution> - <id>start-container</id> - <phase>pre-integration-test</phase> - <goals> - <goal>start</goal> - </goals> - </execution> - <execution> - <id>stop-container</id> - <phase>post-integration-test</phase> - <goals> - <goal>stop</goal> - </goals> - </execution> - </executions> - <configuration> - <wait>false</wait> - <container> - <containerId>${container.name}</containerId> - <zipUrlInstaller> - <url>${container.url}</url> - <installDir>${project.build.directory}/installs/${container.name}</installDir> - </zipUrlInstaller> - <log>${project.build.directory}/logs/${container.name}.log</log> - <output>${project.build.directory}/logs/${container.name}.out</output> - <timeout>600000</timeout> - <systemProperties> - <appserver.base>${project.build.directory}/appserver-base</appserver.base> - <appserver.home>${project.build.directory}/appserver-base</appserver.home> - </systemProperties> - </container> - <configuration> - <home>${project.build.directory}/${container.name}conf</home> - <type>existing</type> - <properties> - <cargo.servlet.port>9696</cargo.servlet.port> - </properties> - </configuration> - </configuration> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> @@ -328,9 +179,182 @@ </build> <profiles> <profile> + <id>create-container</id> + <activation> + <property> + <name>!container</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>dependency-maven-plugin</artifactId> + <executions> + <execution> + <id>unzip-archiva-webapp</id> + <phase>generate-resources</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>archiva-webapp</artifactId> + <version>${project.version}</version> + <type>war</type> + </artifactItem> + </artifactItems> + <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory> + </configuration> + </execution> + <execution> + <id>prepare-provided-dependencies</id> + <phase>generate-resources</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <includeGroupIds>org.apache.derby,javax.mail,javax.activation</includeGroupIds> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <excludeTransitive>false</excludeTransitive> + <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy todir="${project.build.directory}/appserver-base"> + <fileset dir="src/test/it-resources/appserver-base" /> + </copy> + <copy todir="${project.build.directory}/repository"> + <fileset dir="src/test/it-resources/repository" /> + </copy> + <copy todir="${project.build.directory}/index"> + <fileset dir="src/test/it-resources/index" /> + </copy> + <copy todir="${project.build.directory}/snapshots"> + <fileset dir="src/test/it-resources/snapshots" /> + </copy> + <copy todir="${project.build.directory}/projects"> + <fileset dir="src/test/it-resources/projects" /> + </copy> + <copy todir="${project.build.directory}/local-repo"> + <fileset dir="src/test/it-resources/local-repo" /> + </copy> + </tasks> + </configuration> + </execution> + <execution> + <id>copy-container-conf</id> + <phase>package</phase> + <configuration> + <tasks> + <copy todir="${project.build.directory}/${container.name}conf"> + <fileset dir="src/test/${container.name}" /> + </copy> + <copy + todir="${project.build.directory}/installs/${container.name}/apache-tomcat-5.5.26/apache-tomcat-5.5.26/common/lib"> + <fileset dir="${project.build.directory}/providedDependencies"> + <include name="**/*.jar" /> + </fileset> + </copy> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> + <id>check-archiva-loaded</id> + <phase>integration-test</phase> + <configuration> + <tasks> + <get src="http://localhost:9696/archiva/" dest="${project.build.directory}/index.html" /> + <delete file="${project.build.directory}/index.html" /> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-maven2-plugin</artifactId> + <version>1.0</version> + <executions> + <execution> + <id>start-container</id> + <phase>pre-integration-test</phase> + <goals> + <goal>start</goal> + </goals> + </execution> + <execution> + <id>stop-container</id> + <phase>post-integration-test</phase> + <goals> + <goal>stop</goal> + </goals> + </execution> + </executions> + <configuration> + <wait>false</wait> + <container> + <containerId>${container.name}</containerId> + <zipUrlInstaller> + <url>${container.url}</url> + <installDir>${project.build.directory}/installs/${container.name}</installDir> + </zipUrlInstaller> + <log>${project.build.directory}/logs/${container.name}.log</log> + <output>${project.build.directory}/logs/${container.name}.out</output> + <timeout>600000</timeout> + <systemProperties> + <appserver.base>${project.build.directory}/appserver-base</appserver.base> + <appserver.home>${project.build.directory}/appserver-base</appserver.home> + </systemProperties> + </container> + <configuration> + <home>${project.build.directory}/${container.name}conf</home> + <type>existing</type> + <properties> + <cargo.servlet.port>9696</cargo.servlet.port> + </properties> + </configuration> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>existing-container</id> + <activation> + <property> + <name>container</name> + <value>existing</value> + </property> + </activation> + <!-- edit src/test/resources/testng.properties as needed --> + </profile> + <profile> <id>tomcat5x</id> <activation> - <activeByDefault>true</activeByDefault> + <property> + <name>!container</name> + </property> </activation> <properties> <container.name>tomcat5x</container.name> |