Announcement Announcement Module
Collapse
No announcement yet.
What's the point in automatically generated integration tests? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    1. 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.
    2. Method names mangled by AspectJ shown in stacktraces make the situation even worse.
    3. 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?

  • #2
    I fully agree with you...partially on this one.

    In my opinion the purpose of Roo is to give you a quick-clean-standardized-save-time-consequently-save-money point of start for your Java web development project.

    In other words: You take what Roo delivers to you -which is a lot- and you turn it in the project that you really need.

    So, take DOD and make it work for you.


    Thx
    jD

    Comment


    • #3
      Originally posted by Madkinder View Post
      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?
      For me they catch structural errorsthat cause the context not to load and similar as I'm rapidly building up my objects and their relationships. I use Infinitest all the time.

      Originally posted by Madkinder View Post
      Maybe I am missing something in this whole concept of auto test generation so could somebody shed some light on it for me, please?
      When the tests doesn't give you the verification you need you can either remove them completely or make a push-in refactor for some and rewrite these as you need them.

      Comment

      Working...
      X