first you should probably read this first document, but I'm sure you have. This explains the configuration of the testing framework for a single database, and also mentions some important information relating to @NameConverters that should be used when testing your plugin.
Now if you want to test against multiple databases, I suggest you use the following strategy, which is used both in the AO lib and the AO plugin itself:
- Use the DynamicJdbcConfiguration
- Have one maven profile per database, the default one probably being HSQL. Remember that HSQL is more permissive than other DBs though.
- In each profile:
- have a system property set the database you want to use, you'll need to set this against the surefire plugin
- Add a dependency to the JDBC driver needed to connect to this database
This should get you started. Running your tests should be as simple as running mvn install -P'database'.
Some things to note:
- You will not be able to run the tests against all the databases at once, we have one Bamboo build per database.
- Dynamic JDCB configuration and its underlying classes is opiniated, i.e. databases should run on localhost, named 'ao_test' with a user 'ao_user'/'ao_password'
- I't simple to write your own Jdbc configuration, following the same model if you need to, just a few lines of Java.
- You might want to look at this pom.xml which contains all the integrations profiles for the AO lib.
- You'll there the use of the database-maven-plugin, which is a simple plugin I wrote to help configure the database the way I want.
I hope that clarifies things a bit. Don't hesitate to comment if you need more info, I'll be happy to provide.