Deploy to integration server and run smoke test with Maven

Viewed 8198

We are using Maven to build a web application.

Now we'd like our CI (continouous integration) server to automatically deploy the WAR to a remote Tomcat instance which serves as an alpha test server.

We use the cargo-maven-plugin to do this, and it works fine.

However, now we would also like to run a smoke test on the remote Tomcat after deployment, to make sure the (re)deployment went off cleanly.

We have tests to do that (using HtmlUnit), but we're having trouble integrating them into Maven. So far, we started cargo directly (using mvn cargo:redeploy). This worked - however, we could not find a way to run the smoke tests afterwards.

So how can we set up maven to

  • first deploy using cargo
  • then run smoke tests

There does not seem to be a place in the maven build lifecycle for this. Do we need to define a custom build lifecycle? Can we somehow bind to a default lifecycle phase? Which one?

1 Answers
Related