I can't recall where I read the advice but I've been using profiles to set up various test scenarios. This works well as I can then use the dependency logic. These are manually run tests via the command like as in
mvn -Ptest1 Within the profile I can then create a database, load it with test data, run test cases against it and so on. What I'm finding is the profiles which effectively implement the test cases are in need of refactoring and something like the ability for one profile to call another would be great. So, for example, a base profile would set up the base database and other profiles would add specific test data to that. So, the first question is, is this use of profiles correct? I can see that primary purpose of profiles is to set up, well profiles, of different scenarios for the build. In this respect the use of profiles for specific tests falls loosely into this category. However, the use of profiles to perform a kind of macro or script does not seem correct. So, my second question is, what alternative is there to perform these types of tests since the clever stuff that Maven does behind the scenes is a requirement and there does not appear to be another way to achieve this functionality? Thanks.
