diff options
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> |