What's the recipe for running mvn test integration instead of mvn test with Travis?

The travis codec lacks an example of how to simply change the "default test command" from mvn test

to mvn verify

to run the full integration testing lifecycle. Can anyone request a .travis.yml spell for this purpose?

+3


source to share


2 answers


You can simply provide the property with the script

correct value in your travis config file (.travis.yml):



## Run Integration tests
script: "mvn test && mvn verify"

      

+2


source


Tmarwen's answer is correct, but it will run your device tests twice (the "mvn" validation phase already includes the "test" phase) as described in the documentation for Maven - Introduction to Build Lifecycle

You can just use (it will run both unit tests and integration tests, every time). It will work just as well, but faster (no need to delete / specify the folder, recompile all the code, and rerun the unit tests a second time):



script: "mvn verify"

+13


source







All Articles