What's the point in automatically generated integration tests?
Can anybody briefly explain me what's the benefit of entity tests generated by appending --testAutomatically during entity creation?
What errors can these tests catch?
The reason I'm asking is that seen from my (very little) experience they only provide problems most of which are caused by on demand data generation:
- The generated tests aren't independent from each other - each test indirectly invokes entity's .persist(), so if persist()-ing fails for some reason you end up with all the tests for a single entity failed as well. This makes it very tedious to narrow down the reason of the test failure.
- Method names mangled by AspectJ shown in stacktraces make the situation even worse.
- They don't play nice with DB fixtures (or maybe it is just me who didn't make it to work?): the generated tests aren't aware of what you put to the database with import.sql or DbUnit so obviously the tests complain.
I know you'd probably say "you don't like it - then don't use it", but on the other hand so much time and efforts has been put to polish DoD and automatic test generation, so it is probably needed.
Maybe I am missing something in this whole concept of auto test generation so could somebody shed some light on it for me, please?