diff --git a/functional-test/pom.xml b/functional-test/pom.xml index 5eae89d6d6..2bf339f20f 100644 --- a/functional-test/pom.xml +++ b/functional-test/pom.xml @@ -15,17 +15,14 @@ 2.39.0 - false localhost - jboss72x 0 + 8180 - http://downloads.sourceforge.net/project/zanata/server/zanata-server.zip ${project.build.directory}/cargo/installs ${project.build.directory}/jboss/container - ../../cargo/installs/zanata-server zanata @@ -61,7 +58,8 @@ -Xnoagent -Djava.compiler=NONE - **/AggregateTestSuite.java + **/BasicAcceptanceTestSuite.java + ${default.test.patterns} ${project.build.directory}/zanataindex ${project.build.directory}/zanatastats @@ -336,8 +334,6 @@ - wildfly8x - http://download.jboss.org/wildfly/${wildfly.version}/wildfly-${wildfly.version}.zip standalone_wildfly.xml org.wildfly wildfly-ejb-client-bom @@ -346,43 +342,22 @@ - maven-dependency-plugin - - - org.wildfly:wildfly-ejb-client-bom - - - - - org.codehaus.cargo - cargo-maven2-plugin - - + maven-antrun-plugin - cargo-install - prepare-package - - install - + install-wildfly-modules + package + - org.codehaus.gmaven - gmaven-plugin - - - unpack-wildfly-modules - package - - execute - - - ${pom.basedir}/src/etc/wildflyModules.groovy - - - + maven-dependency-plugin + + + org.wildfly:wildfly-ejb-client-bom + + @@ -403,11 +378,63 @@ + + + skipFuncTests + + + skipFuncTests + + + + true + + + + + allFuncTests + + + allFuncTests + true + + + + **/DetailedTestSuite.java + + + + + maven-antrun-plugin + + + check-tests-enabled + validate + + run + + + + + + + + + + + + + + + run-functional-test - functional-test + !skipFuncTests @@ -517,17 +544,6 @@ org.codehaus.cargo cargo-maven2-plugin - - - true - - - - ${cargo.installation} - ${user.home}/Downloads - ${cargo.extract.dir} - - ${cargo.servlet.port} @@ -547,6 +563,10 @@ + + cargo-install + prepare-package + cargo-start pre-integration-test @@ -566,21 +586,6 @@ maven-failsafe-plugin - 2.11 - - - integration-test - - integration-test - - - - verify - - verify - - - false true @@ -588,8 +593,6 @@ ${include.test.patterns} - - **/FeatureTest.java @@ -727,6 +730,10 @@ maven-antrun-plugin + + init-no-appserver + initialize + generate-resources @@ -735,26 +742,50 @@ ===== Properties that can be set for functional test ===== - -Dfunctional-test : to activate functional test run + -DskipFuncTests : to skip running functional tests, and/or: + -DskipArqTests : to skip Arquillian integration tests (if building zanata-war) + + Unless skipping tests, you must choose an appserver: + -Dappserver=jbosseap6 -Dcargo.installation=http://example.com/jbosseap632.zip -Dcargo.basename=jbosseap632 + or -Dappserver=wildfly8 + NB: cargo.basename needs to match the basename of the file given in cargo.installation. + For example, if cargo.installation is http://example.com/download/jboss-6.3.2.zip, cargo.basename should be jboss-6.3.2. + + -DallFuncTests to enable all functional tests (defaults to smoke tests) + + -Dcargo.debug.jvm.args : If not set by default will listen to port 8787. Need to set to empty on jenkins + -Dzanata.target.version=version of zanata to deploy. Default is: ${project.parent.version} -Dzanata.instance.url=http://${cargo.host}:${cargo.servlet.port}/${context.path} -Dzanata.apikey=b6d7044e9ee3b2447c28fb7c50d86d98 -Dzanata.sample.projects.basedir=${project.build.testOutputDirectory}/sample-projects - -Dcargo.debug.jvm.args : If not set by default will listen to port 8787. Need to set to empty on jenkins - -Dinclude.test.patterns=test filter pattern. Can be used to control what test to run. Default is **/*AggregateTestSuite.java. + -Dinclude.test.patterns=test filter pattern. Can be used to control what test to run. Default is ${default.test.patterns} -Dwebdriver.type=run tests in htmlUnit, chrome or firefox. For chrome, see also webdriver.chrome.* Default is chrome. -Dwebdriver.display=display to run test browser in, for Xnest or otherwise. Default is :0. -Dwebdriver.chrome.bin=full path to chrome binary. -Dwebdriver.chrome.driver=full path to chromedriver binary. -Dwebdriver.wait=global wait time in seconds for element searches. Default is 10. ========================================================== - to ask cargo to start up then wait so that tests can be run manually: mvn clean package cargo:run -Dfunctional-test -Dmysql.port=13306 + to ask cargo to start up then wait so that tests can be run manually: mvn clean package cargo:run -Dappserver=wildfly8 -Dmysql.port=13306 + + preIT-no-appserver + prepare-package + run + + + + + + + @@ -800,7 +831,6 @@ - ${cargo.container} installed ${project.build.directory}/container.log diff --git a/functional-test/src/etc/wildflyModules.groovy b/functional-test/src/etc/wildflyModules.groovy deleted file mode 100644 index 240212f518..0000000000 --- a/functional-test/src/etc/wildflyModules.groovy +++ /dev/null @@ -1,51 +0,0 @@ - -def download(String address, File destFile) { - def file = new FileOutputStream(destFile) - def out = new BufferedOutputStream(file) - out << new URL(address).openStream() - out.close() -} - -def mojarraUrl = "http://sourceforge.net/projects/zanata/files/wildfly/wildfly-8.1.0.Final-module-mojarra-2.1.28.zip/download" -def hibernateUrl = "http://sourceforge.net/projects/zanata/files/wildfly/wildfly-8.1.0.Final-module-hibernate-main-4.2.15.Final.zip/download" - -File mojarraZip = new File(project.build.directory, "mojarra.zip") -File hibernateZip = new File(project.build.directory, "hibernate.zip") - -download(mojarraUrl, mojarraZip) -download(hibernateUrl, hibernateZip) - - -def ant = new AntBuilder() - -def mojarraModuleDest = project.build.directory + "/mojarra" -ant.unzip(src: mojarraZip.absolutePath, dest: mojarraModuleDest, overwrite: "true" ) -def hibernateModuleDest = project.build.directory + "/hibernate" -ant.unzip(src: hibernateZip.absolutePath, dest: hibernateModuleDest, overwrite: "true" ) - -File wildFlyInstallRoot = new File(project.properties['cargo.extract.dir']) -def dirFilter = { - it.isDirectory(); -} as FileFilter - -def listSubDirs = { File it -> - it.listFiles(dirFilter) -} - -def subDirs = listSubDirs(wildFlyInstallRoot) -File wildFlyRoot; -while (subDirs.size() == 1) { - wildFlyRoot = subDirs[0] - subDirs = listSubDirs(wildFlyRoot) -} - -assert wildFlyRoot != null -println "Wild Fly root is at $wildFlyRoot" - -ant.copy(todir: wildFlyRoot, overwrite: true) { - fileset(dir: mojarraModuleDest) -} - -ant.copy(todir: wildFlyRoot, overwrite: true) { - fileset(dir: hibernateModuleDest) -} diff --git a/pom.xml b/pom.xml index e87ab9d684..b6455e9503 100644 --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,11 @@ 5.1.26 compile + + ${project.build.directory}/cargo/installs + + + @@ -946,12 +951,94 @@ + + + maven-antrun-plugin + 1.8 + + + init-no-appserver + + none + run + + + + + + + + + + + + + + + org.codehaus.cargo + cargo-maven2-plugin + 1.4.5 + + + ${cargo.container} + + + ${cargo.installation} + ${user.home}/Downloads + ${cargo.extract.dir} + + + + + + + + + cargo-install + + none + + install + + + + maven-failsafe-plugin 2.12 + + true + + + + integration-test + + integration-test + + + + verify + + verify + + + org.apache.maven.plugins @@ -1080,17 +1167,93 @@ + + jbosseap6 + + + appserver + jbosseap6 + + + + jboss72x + + jboss-eap-6.3 + + ${cargo.extract.dir}/${cargo.basename}/${appserver.dir.name} + + + wildfly8 + true appserver wildfly8 + wildfly8x + 8.1.0.Final + + wildfly8 + http://download.jboss.org/wildfly/${wildfly.version}/wildfly-${wildfly.version}.zip + + wildfly-${wildfly.version} + + ${cargo.extract.dir}/${appserver.dir.name}/${appserver.dir.name} + + 8.1.0.Final + 2.1.28 + wildfly-${module.wildfly.version}-module-mojarra-${mojarra.module.version}.zip + 4.2.15.Final + wildfly-${module.wildfly.version}-module-hibernate-main-${hibernate.module.version}.zip + ${project.build.directory}/downloads + + + + + + maven-antrun-plugin + + + install-wildfly-modules + + none + + run + + + + + + + + + + + + + + + + + diff --git a/zanata-war/pom.xml b/zanata-war/pom.xml index db09a279d4..b63e3ce816 100644 --- a/zanata-war/pom.xml +++ b/zanata-war/pom.xml @@ -974,6 +974,81 @@ + + skipArqTests + + + skipArqTests + + + + true + + + + + run-arq-tests + + + !skipArqTests + + + + + + maven-antrun-plugin + + + init-no-appserver + initialize + + + preIT-no-appserver + prepare-package + run + + + + + + + + + + + org.codehaus.cargo + cargo-maven2-plugin + + + cargo-install + prepare-package + + + + + + maven-failsafe-plugin + + + **/*ITCase.java + + 1 + true + false + alphabetical + + org.jboss.logmanager.LogManager + ${appserver.home} + + none:none + + + + + + jbosseap6 @@ -987,19 +1062,18 @@ maven-antrun-plugin + prepare-arquillian-container - pre-integration-test + package run - - + + tofile="${appserver.home}/standalone/configuration/standalone-arquillian.xml" /> @@ -1019,31 +1093,14 @@ - maven-failsafe-plugin - - - - container-tests - - integration-test - verify - - - - **/*ITCase.java - - none:none - alphabetical - 1 - true - - jbossas-managed - - - - + + + + jbossas-managed + + @@ -1100,36 +1157,10 @@ wildfly8 - - ${project.build.directory}/wildfly/wildfly-${wildfly.version} - - maven-dependency-plugin - - - unpack - pre-integration-test - - unpack - - - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - false - ${project.build.directory}/wildfly - - - - - @@ -1143,78 +1174,42 @@ maven-antrun-plugin + + install-wildfly-modules + package + + + prepare-arquillian-container - pre-integration-test + package run - + - - - - - + tofile="${appserver.home}/standalone/configuration/standalone.xml" /> - maven-failsafe-plugin - - - - container-tests - - integration-test - verify - - - - **/*ITCase.java - - none:none - alphabetical - 1 - true - - wildfly81 - org.jboss.logmanager.LogManager - - ${wildfly.home} - - false - - - + + + + wildfly81 + + - - io.undertow - undertow-core - 1.0.15.Final - provided - org.wildfly wildfly-arquillian-container-managed diff --git a/zanata-war/src/test/resources/arquillian.xml b/zanata-war/src/test/resources/arquillian.xml index 4c62e2a092..5823647c7f 100644 --- a/zanata-war/src/test/resources/arquillian.xml +++ b/zanata-war/src/test/resources/arquillian.xml @@ -12,7 +12,7 @@ - ${arquillian.jboss.home} + ${jboss.home}