Accessing Test Classes

In case your pre-/post-build scripts perform complex operations that you would rather like to refactor out into some utility class instead of copy&pasting them in each script, you can use the parameter addTestClassPath:


Setting addTestClassPath to true will prepend the directory ${} and all dependencies of your project to the class path of the script interpreter. Among others, this allows you to create some utility classes in your test source tree and use this code for the integration tests.

Note: Of course, this requires your test classes to be compiled before running the integration tests but this is usually the case if you employ the Invoker Plugin during the lifecycle phase integration-test.