We have a Java Web Project running on Tomcat 7 and we use Maven as our build tool. In our actual test process we need to do some manual steps to build our project for test environment:
- Checkout git branch with the code to test.
- With maven, use the production profile to create the war file running
mvn clean package -P production
. - Access our local PC where the war file will be deployed
http://ift.tt/2jpHwZH
using a web browser. - Upload the war file generated by maven and wait for deploy finishes.
- Our tester start the testing
- If any problem is found, we fix it and repeat the process until the test is successful
What we would like to achieve is a minimum manual process as possible, with for example running a command like mvn deployTest -DtestId=SC-1550
will do the following steps:
- Run unit tests
- Run integration tests
- Build the war file on production profile
- Use the parameter "testId" as the war file name, so our tester will access
https://localhost:8443/TESTID
and start the testing. In that way, we can have multiple features ready for testing, just need to access the correct address with the test issue ID. - The war file is deployed to Tomcat 7 using the
maven-tomcat7
plugin in the specific IP address of our test machine - The environment is ready for testing with the new feature.
- If any problem is found, we commit the fix on our git and again, run the maven command
mvn deployTest -DtestId=SC-1550
Doing so, we substitute a mostly manual process to a single command, speeding up our testing.
My question is if there is a way to automatize this process by configuring the pom file, or using a plugin or even implementing our own plugin to do this steps with a single command.
Aucun commentaire:
Enregistrer un commentaire