Is there a way to tell Tomcat to import a folder when starting so i can use it’s content via tomcat . in my case the folder is the src/test/java that contain test classes .
i need to run the test classes using command line
Thank you in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The basic thing is to use maven-failsafe-plugin to run the integration tests. In you case this means you need to have a separate maven-module (call it: mod-it) which contains the configuration for the integration tests. The best recommendation i can give is to use the cargo2-maven-plugin to start/deploy etc. Tomcat and deploy the war application within tomcat. Furthermore you should have a layout like this:
The integration tests should be named like *IT.java to get them run by the maven-failsafe-plugin
The best thing is to read this example which contains a complete example with Tomcat and cargo plugin. You can download the full example source incl. pom’s etc. here.