From 137aca009c0f9804ad69bbc6ad956bdc386ac4d9 Mon Sep 17 00:00:00 2001 From: Wendy Smoak Date: Thu, 14 May 2009 14:24:45 +0000 Subject: [PATCH] [MRM-1164] Make TestNG the primary set of tests. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@774781 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp-test/ReadMe.txt | 7 +- .../archiva-webapp-test/junit-pom.xml | 332 ++++++++++++++ .../archiva-web/archiva-webapp-test/pom.xml | 428 +++++++++++------- .../archiva-webapp-test/testng-pom.xml | 426 ----------------- 4 files changed, 598 insertions(+), 595 deletions(-) create mode 100644 archiva-modules/archiva-web/archiva-webapp-test/junit-pom.xml delete mode 100644 archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml diff --git a/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt b/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt index 64702d56d..5a24e5b8d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt +++ b/archiva-modules/archiva-web/archiva-webapp-test/ReadMe.txt @@ -1,12 +1,15 @@ ReadMe ---------- Run selenium tests in src/test/testng with Maven and TestNG - - mvn clean install -f testng-pom.xml + - mvn clean install 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 -Dcontainer-existing + - mvn clean install -Dcontainer-existing For the default values in the scripts, to pass all the tests, you need to add an artifact in internal repository. + +Run Selenium tests in src/test/it with Maven and JUnit + - mvn clean install -f junit-pom.xml \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/junit-pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/junit-pom.xml new file mode 100644 index 000000000..1b507b051 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp-test/junit-pom.xml @@ -0,0 +1,332 @@ + + + + 4.0.0 + + org.apache.archiva + archiva-web + 1.2.1-SNAPSHOT + + archiva-webapp-test + pom + Archiva Web :: Application Tests + + + org.codehaus.plexus + plexus-command-line + 1.0-alpha-2 + + + plexus-container-default + org.codehaus.plexus + + + + + org.apache.archiva + archiva-webapp + war + + + org.codehaus.plexus + plexus-utils + + + org.codehaus.plexus + plexus-slf4j-logging + + + org.openqa.selenium.client-drivers + selenium-java-client-driver + 0.8.1 + test + + + + + jdom + jdom + + + jaxen + jaxen + + + + + org.apache.derby + derby + + + javax.mail + mail + + + javax.activation + activation + + + + src/test/it + + + maven-resources-plugin + + + + testResources + + + + + + org.codehaus.mojo + dependency-maven-plugin + + + unzip-archiva-webapp + generate-resources + + unpack + + + + + ${project.groupId} + archiva-webapp + ${project.version} + war + + + ${project.build.directory}/${container.name}conf/webapps/archiva + + + + prepare-provided-dependencies + generate-resources + + copy-dependencies + + + org.apache.derby,javax.mail,javax.activation + false + true + false + ${project.build.directory}/providedDependencies + + + + + + maven-antrun-plugin + + + generate-resources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + copy-container-conf + package + + + + + + + + + + + + + + run + + + + check-archiva-loaded + integration-test + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + testCompile + + + + + + org.codehaus.mojo + selenium-maven-plugin + 1.0-beta-1 + + + start-selenium + pre-integration-test + + start-server + + + + + true + + + + org.codehaus.cargo + cargo-maven2-plugin + 1.0 + + + start-container + pre-integration-test + + start + + + + stop-container + post-integration-test + + stop + + + + + false + + ${container.name} + + ${container.url} + ${project.build.directory}/installs/${container.name} + + ${project.build.directory}/logs/${container.name}.log + ${project.build.directory}/logs/${container.name}.out + 600000 + + ${project.build.directory}/appserver-base + ${project.build.directory}/appserver-base + + + + ${project.build.directory}/${container.name}conf + existing + + 9696 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + + + + browser + ${browser} + + + + + + + + + tomcat5x + + true + + + tomcat5x + http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip + + + + firefox + + true + + + *firefox + + + + iexplore + + *iexplore + + + + otherbrowser + + *custom ${browserPath} + + + + \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml index 1b507b051..3b73486b6 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml @@ -28,7 +28,25 @@ archiva-webapp-test pom Archiva Web :: Application Tests + + + + openqa-snapshots + http://nexus.openqa.org/content/repositories/snapshots + false + + + + + org.testng + testng + 5.8 + jar + jdk15 + test + false + org.codehaus.plexus plexus-command-line @@ -56,8 +74,14 @@ org.openqa.selenium.client-drivers selenium-java-client-driver - 0.8.1 + 1.0-SNAPSHOT test + + + commons-logging + commons-logging + + @@ -85,7 +109,16 @@ - src/test/it + src/test/testng + + + src/test/resources + true + + **/* + + + maven-resources-plugin @@ -97,113 +130,14 @@ - - org.codehaus.mojo - dependency-maven-plugin - - - unzip-archiva-webapp - generate-resources - - unpack - - - - - ${project.groupId} - archiva-webapp - ${project.version} - war - - - ${project.build.directory}/${container.name}conf/webapps/archiva - - - - prepare-provided-dependencies - generate-resources - - copy-dependencies - - - org.apache.derby,javax.mail,javax.activation - false - true - false - ${project.build.directory}/providedDependencies - - - - - - maven-antrun-plugin - - - generate-resources - - run - - - - - - - - - - - - - - - - - - - - - - - - - - copy-container-conf - package - - - - - - - - - - - - - - run - - - - check-archiva-loaded - integration-test - - - - - - - - run - - - - org.apache.maven.plugins maven-compiler-plugin + + 1.5 + 1.5 + true + @@ -215,7 +149,7 @@ org.codehaus.mojo selenium-maven-plugin - 1.0-beta-1 + 1.0-rc-1 start-selenium @@ -229,104 +163,264 @@ true - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - ${container.name} - - ${container.url} - ${project.build.directory}/installs/${container.name} - - ${project.build.directory}/logs/${container.name}.log - ${project.build.directory}/logs/${container.name}.out - 600000 - - ${project.build.directory}/appserver-base - ${project.build.directory}/appserver-base - - - - ${project.build.directory}/${container.name}conf - existing - - 9696 - - - - org.apache.maven.plugins maven-surefire-plugin + + + src/test/testng/config/testng.xml + + + integration-tests integration-test test + + + + browser + ${selenium.browser} + + + - - - - browser - ${browser} - - - + + create-container + + + !container + + + + + + org.codehaus.mojo + dependency-maven-plugin + + + unzip-archiva-webapp + generate-resources + + unpack + + + + + ${project.groupId} + archiva-webapp + ${project.version} + war + + + ${project.build.directory}/${container.name}conf/webapps/archiva + + + + prepare-provided-dependencies + generate-resources + + copy-dependencies + + + org.apache.derby,javax.mail,javax.activation + false + true + false + ${project.build.directory}/providedDependencies + + + + + + maven-antrun-plugin + + + generate-resources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + copy-container-conf + package + + + + + + + + + + + + + + run + + + + check-archiva-loaded + integration-test + + + + + + + + run + + + + + + org.codehaus.cargo + cargo-maven2-plugin + 1.0 + + + start-container + pre-integration-test + + start + + + + stop-container + post-integration-test + + stop + + + + + false + + ${container.name} + + ${container.url} + ${project.build.directory}/installs/${container.name} + + ${project.build.directory}/logs/${container.name}.log + ${project.build.directory}/logs/${container.name}.out + 600000 + + ${project.build.directory}/appserver-base + ${project.build.directory}/appserver-base + + + + ${project.build.directory}/${container.name}conf + existing + + 9696 + + + + + + + + + existing-container + + + container + existing + + + + tomcat5x - true + + !container + tomcat5x - http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip + http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip firefox - true + + !browser + - *firefox + *firefox iexplore + + + browser + iexplore + + - *iexplore + *iexplore + + + + safari + + + browser + safari + + + + *safari otherbrowser + + + browser + other + + - *custom ${browserPath} + *custom ${browserPath} - \ No newline at end of file + diff --git a/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml deleted file mode 100644 index 3b73486b6..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-test/testng-pom.xml +++ /dev/null @@ -1,426 +0,0 @@ - - - - 4.0.0 - - org.apache.archiva - archiva-web - 1.2.1-SNAPSHOT - - archiva-webapp-test - pom - Archiva Web :: Application Tests - - - - openqa-snapshots - http://nexus.openqa.org/content/repositories/snapshots - false - - - - - - org.testng - testng - 5.8 - jar - jdk15 - test - false - - - org.codehaus.plexus - plexus-command-line - 1.0-alpha-2 - - - plexus-container-default - org.codehaus.plexus - - - - - org.apache.archiva - archiva-webapp - war - - - org.codehaus.plexus - plexus-utils - - - org.codehaus.plexus - plexus-slf4j-logging - - - org.openqa.selenium.client-drivers - selenium-java-client-driver - 1.0-SNAPSHOT - test - - - commons-logging - commons-logging - - - - - - - jdom - jdom - - - jaxen - jaxen - - - - - org.apache.derby - derby - - - javax.mail - mail - - - javax.activation - activation - - - - src/test/testng - - - src/test/resources - true - - **/* - - - - - - maven-resources-plugin - - - - testResources - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - true - - - - - testCompile - - - - - - org.codehaus.mojo - selenium-maven-plugin - 1.0-rc-1 - - - start-selenium - pre-integration-test - - start-server - - - - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - - src/test/testng/config/testng.xml - - - - - integration-tests - integration-test - - test - - - - - browser - ${selenium.browser} - - - - - - - - - - - create-container - - - !container - - - - - - org.codehaus.mojo - dependency-maven-plugin - - - unzip-archiva-webapp - generate-resources - - unpack - - - - - ${project.groupId} - archiva-webapp - ${project.version} - war - - - ${project.build.directory}/${container.name}conf/webapps/archiva - - - - prepare-provided-dependencies - generate-resources - - copy-dependencies - - - org.apache.derby,javax.mail,javax.activation - false - true - false - ${project.build.directory}/providedDependencies - - - - - - maven-antrun-plugin - - - generate-resources - - run - - - - - - - - - - - - - - - - - - - - - - - - - - copy-container-conf - package - - - - - - - - - - - - - - run - - - - check-archiva-loaded - integration-test - - - - - - - - run - - - - - - org.codehaus.cargo - cargo-maven2-plugin - 1.0 - - - start-container - pre-integration-test - - start - - - - stop-container - post-integration-test - - stop - - - - - false - - ${container.name} - - ${container.url} - ${project.build.directory}/installs/${container.name} - - ${project.build.directory}/logs/${container.name}.log - ${project.build.directory}/logs/${container.name}.out - 600000 - - ${project.build.directory}/appserver-base - ${project.build.directory}/appserver-base - - - - ${project.build.directory}/${container.name}conf - existing - - 9696 - - - - - - - - - existing-container - - - container - existing - - - - - - tomcat5x - - - !container - - - - tomcat5x - http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip - - - - firefox - - - !browser - - - - *firefox - - - - iexplore - - - browser - iexplore - - - - *iexplore - - - - safari - - - browser - safari - - - - *safari - - - - otherbrowser - - - browser - other - - - - *custom ${browserPath} - - - - -- 2.39.5