[zanata-devel] Changes to Maven profiles for integration tests

Alex Eng aeng at redhat.com
Thu Feb 5 03:04:22 UTC 2015


Another thing I found, if I got $JBOSS_HOME in my path, it will use that jboss to run functional test.

Regards, 

Alex Eng 
Senior Software Engineer 
DID: +61 3514 8262 
Mobile: +614 2335 3457 
Email: aeng at redhat.com 

Red Hat, Asia-Pacific Pty Ltd 
Level 1, 193 North Quay 
Brisbane 4000 
Office: +61 7 3514 8100 
Fax: +61 7 3514 8199 
Website: www.redhat.com 

----- Original Message -----
From: "Sean Flanigan" <sflaniga at redhat.com>
To: "zanata-devel" <zanata-devel at redhat.com>
Sent: Thursday, 5 February, 2015 12:09:02 PM
Subject: [zanata-devel] Changes to Maven profiles for integration tests

Hi all,

I have been trying to rationalise the profiles and properties we use
when running integration tests, both Arquillian and Selenium.  Both
types of tests now use Cargo to download and install the appserver, with
a choice of WildFly or EAP 6 (*not* zanata-server.zip).

Overall, I think it is simpler to use, but you will probably need to
change the profiles and properties you use when building and testing
Zanata via Maven.

By default, our Maven build will now run integration tests (all
Arquillian tests and the Selenium smoke tests, ie BATs) when you run
`mvn verify` or `mvn install`.  (Previously functional tests only ran if
you set `-Dfunctional-test`.)

However, due to limitations in Maven 3.0's profile activation, it
doesn't reliably default to WildFly 8 as it should.  (So, you have to
use `mvn verify -Dappserver=wildfly8`, not just `mvn verify`.)


Short version:

For wildfly (recommended for development):

mvn verify -Dappserver=wildfly8 # DO NOT specify cargo.installation or
                                # cargo.basename (unless experimenting)

For EAP (recommended for production, and release testing):

mvn verify -Dappserver=jbosseap6 # you must also specify
                                 # cargo.installation URL
                                 # and matching cargo.basename

For neither (skip all integration tests):

mvn verify -DskipArqTests -DskipFuncTests

If you don't need to build the jars/wars, you can still just use:

mvn test # compile and run unit tests only


You should remove these options from your Maven commands:

-Dinclude.test.patterns (still works, but use -DallFuncTests if you want
to run all tests)
-Dcargo.installation (unless using jbosseap6)
-Darquillian.jboss.home (obsolete; cargo downloads everything now)
-Dfunctional-test (obsolete; use -DskipFuncTests to disable functional
tests now)
-DnewCompiler (obsolete)


I have added this information to
https://github.com/zanata/zanata-server/wiki/Working-With-Maven

Please let me know if I've missed anything!

Regards

-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat


_______________________________________________
zanata-devel mailing list
zanata-devel at redhat.com
https://www.redhat.com/mailman/listinfo/zanata-devel




More information about the zanata-devel mailing list