We are using Hibernate. And Hibernate like any tools can be use badly and generate too much queries if it is used by a novice developer.
In order to prevent this, i would like to test some dao againt real production database and assert that this test generate only N queries, no matter what tools is used (Hibernate, Ibatis) as long it is using jdbc underneath.
...
@MaxSqlQueries(5)
pu开发者_如何转开发blic void testPerformanceDao(){
}
We are using Spring test framework. I'm wondering if anyone has implemented such thing or any framework with Junit allows that.
Thanks in advance !
Update !
I have proposed this feature to the spring team test and it seems it will be implemented as it was already assigned to someone.
See SPR-8569
精彩评论