Sunday, 15 January 2012

java - Maven Unit Tests -


I am working on a project that has been written using Maven.

If I do

  mvn clean install   

I hope this test Dada

I redirected the build process and stored it in an output file and tried to find unit tests by name. However, I was not able to get some unit tests. It seems that some unit tests were not actually executed during the manufacturing process

My question is how can I know the selection of unit tests that will be executed during the build process.

Thank you in advance

You can explicitly name the group in the command line like this Try to give:

  mvn clean install -Destest.groups = "unit, integration"   

or simply

  mvn test --Destest.groups = "unit, integration"   

This is a daily example that I use to either test my unit or < Strong> integration group if you need to explicitly specify all (or some) tests If you want to run all (or some) tests without the need, then you must modify your maven configuration to use which gorups.

No comments:

Post a Comment