[hibernate-dev] ORM and database testing
steve at hibernate.org
Thu May 28 10:14:08 EDT 2015
On Thu, May 28, 2015 at 8:44 AM, Sanne Grinovero <sanne at hibernate.org>
> I particularly like the idea of having H2 start/stop like any other db.
> Regarding profiles, rather than running the build with a single
> profile in "maven style", would it not be feasible to have one build
> iterate on each configuration set?
> For example:
> gradle test -PdbProfiles=mysql,h2,mssql
> I'd expect that to do a single compilation phase, then loop on the
> tests 3 times with different settings as needed. Not sure how easy it
> would be to get unified reports out of there, but we want to consider
> *the* build successful when it passes all profiles, rather than having
> to monitor the output of multiple builds (and all related email spam).
> In an ideal evolution then maybe we would also be able to mark some
> tests which are database independent to not be repeated at all.
We have that today already today. So yeah :)
The difference today is that my matrix plugin dynamically generates actual
tasks. So assuming you had those profiles on your system you'd get dynamic
tasks: matrix_mysql, matrix_h2, matrix_mssql. You'd also have a task
`matrix` that runs all of those.
The rub is that we actually do not leverage this today. Today every single
build runs just one profile. If we are going to allow running multiple
profiles at the same time, I personally think the matrix and dynamic tasks
are the better option. So really I was more asking a question I guess
whether anyone plans on using that capability :) Because to run just one
profile, the matrix add a lot of complexity that is probably just not
More information about the hibernate-dev