[hibernate-dev] database testing matrix

Hardy Ferentschik hardy at hibernate.org
Mon Aug 22 11:39:11 EDT 2011


We forgot to log the IRC meeting today. We did not really have a meeting  
as such, but we briefly
discussed the database testing matrix (a way to test against multiple  
databases using our gradle build).
If you are interested read on:


stliu: hardy, and for the matrix testing, i'm planning separate functional  
tests and unit tests
[3:15pm] stliu: so, we have hibernate-core/src/{main|test|matrix}
[3:15pm] hardy: what's functional test vs unit test for you
[3:15pm] hardy: are you using Steve's terminology here?
[3:16pm] stliu: unit test == don't care the underlying db, either no db  
involved or just H2 is enough
[3:16pm] stliu: functional test == we need make sure these tests work fine  
on the DB matrix
[3:17pm] hardy: are functional test not what we used to have in the  
hibernate-test module back w/ maven
[3:18pm] stliu: yes, basically those are functional tests
[3:18pm] hardy: and I think in Steve's world anything which requires a  
database including H2 wold already be functional test
[3:19pm] hardy: I think I would call the directory "functional" instead of  
"matrix"
[3:19pm] stliu: yeah, maybe i need find a better name  "function test  
which not limit to H2"
[3:19pm] hardy:
[3:20pm] stliu: gradle test --> run all tests (src/test and src/matrix) on  
the default DB (H2) (H2 driver will be in classpath, as well as  
hibernate.properties)
[3:20pm] stliu: gradle matrixMysql50 --> run all src/matrix tests on Mysql  
50
[3:21pm] stliu: gradle matrix --> run all src/matrix tests on the DB  
matrix (defined in a "databases" directory)
[3:21pm] hardy: is this in any ways related to the matrix plugin someone  
(Steve I think) started to write?
[3:22pm] stliu: yes, i'm working on it based on his work
[3:22pm] hardy: i see
[3:23pm] hardy: matrixMysql50 - is that a dynamic target? I think gradle  
can have dynamic target, right?
[3:23pm] stliu: it is
[3:23pm] stliu: we have something like
[3:23pm] hardy: so it is somehow equivalent to gradle matrix -Ddb=mysql50
[3:23pm] stliu:  
hibernate-core/databases/Mysql50/{ivy.xml|resources/hibernate.properties}
[3:24pm] stliu: or  
databases/DB2V97/{jdbc/db2-driver.jar|resources/hibernate.properties}
[3:24pm] hardy: and we are actually checking in driver jars?
[3:25pm] stliu: yep, but i'd prefer we use dynamic task name instead of  
property
[3:25pm] stliu: no
[3:25pm] hardy: why do you think dynamic tasks are better?
[3:26pm] stliu: well, gradle tasks can show which tasks are available
[3:26pm] stliu: if we chose property, we have to remember which database  
are ready for testing or document it somewhere
[3:27pm] hardy: so 'gradle tasks' would automatically list all dynamic  
tasks?
[3:27pm] stliu: yep, based on which sub-dir (and if it is correct) you  
have in "databases"
[3:29pm] hardy: i see
[3:29pm] hardy: sounds all fair enough
[3:29pm] stliu: https://gist.github.com/1162672
[3:30pm] stliu: there is a matrix - Runs the unit tests on Database Matrix  
[classes, jar, matrixClasses, testClasses, :hibernate-testing:jar,  
:hibernate-testing:sourcesJar]
[3:30pm] stliu:     matrix_h2 - Runs the matrix against h2
[3:30pm] stliu:     matrix_mysql50 - Runs the matrix against mysql50
[3:30pm] hardy: ok
[3:31pm] stliu: but i'd say i haven't found a way to let IDE support this
[3:32pm] stliu: hardy, we forgot startmeeting ...
[3:32pm] hardy: never mind
[3:33pm] stliu: okay, i don't have anything else
[3:33pm] hardy: ok
[3:34pm] stliu: madhumita, take a look of above to see how i implement the  
db matrix testing
[3:35pm] stliu: hardy, you send these transaction log to dev so steve can  
take a look?
[3:36pm] hardy: ok



More information about the hibernate-dev mailing list