i have created a multi-module maven project and i am trying to write and execute some tests on specific modules. I am trying to put all test-code into a separate module, but i am wondering if this is the correct way and if so how to i setup the maven build/test cycle so mvn install will use these tests?
Share
According to the Maven Standard Directory Layout test classes belong to the directory
src/test/javaand required resources tosrc/test/resources. On the long term it will make your life easier by following the rules, especially when you work on many different projects (where you sometimes can not define alternative structures). In this setup the test cases are automatically invoked bymvn installormvn test.You find more informations about the surefire-plugin (responsible for executing the tests) here.