Sunday, January 19, 2014

Maven Test

  • Don't run unit tests, run integration tests directly
    $ mvn test-compile failsafe:integration-test
    
  • Run a single integration test in multiple modules projects.
    $ mvn -am -pl :sub-module -Dit.test=MyIntegrationTest -DfailIfNoTests=false test-compile failsafe:integration-test
    
    • -am allows resolving dependencies using the working directory.
    • -pl :sub-module specifies the module
    • -DfailIfNoTests=false allows not failing in dependent modules.

No comments:

Post a Comment