I want created a integration-test with web server tomcat
to launch integration test execute
mvn integration-test -Ptomcat
to generate war file
mvn package
In a hand i have web server tomcat: to launch integration-test i have a this file pom.xml to start and stop tomcat web service
tomcat
org.codehaus.mojo
tomcat-maven-plugin
1.1
true
true
/${project.build.finalName}
${project.build.directory}/${project.build.finalName}.war
9876
start-tomcat
pre-integration-test
run-war
stop-tomcat
post-integration-test
shutdown
and the other hand i have the integration test
maven-surefire-plugin
true
maven-failsafe-plugin
2.7.2
**/*Test.java
integration-test
integration-test
integration-test
verify
verify
verify
But I have a problem to add resources files.
you need add this line in your pom.xml file
src/test/resources
app.properties
and add this line in pom.xml file to erase previous resources files generate with execute integration test
org.apache.maven.plugins
maven-clean-plugin
2.5
clean
generate-resources
clean
No comments:
Post a Comment