Testing multiple versions of your code with Ant and Maven

Did you face the problem that your code must work with 2 or more different versions of a different component? I did.

While I was developing version 3.2 of Mule’s Activiti module I need to check that it works with version Activiti 5.3 and 5.4 (and all the upcoming versions as these guys release every month!).

The steps I need to follow for each version are:

  1. Stop, clean and start Activiti server.
  2. Deploy some examples to the Activiti server.
  3. Run all the tests of my Maven project.

So I create a build file for these steps (you can see the full file here). Below I show the call to the maven script from ant:

Notice that the ant script receives a parameter called activiti.version that is passed to maven to select the version of their dependencies in the pom.xml file:

Hope you start to automate your testing across multiple versions soon!


2 Responses to “Testing multiple versions of your code with Ant and Maven”

Leave a Reply