Announcement Announcement Module
No announcement yet.
Purpose of integration testing? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Purpose of integration testing?

    It's quiet plain to me this question doesn't really concern the Spring framework, but as I've read the testing reference [1] I wondered what integration testing is about? If all components work as expected why should fail something when "glueing" those together?

    Are there any further statements describing integration testing except Wikipedia [2].



  • #2
    why should fail something when "glueing" those together?
    Could be many reasons. Often integration tests test infrastructure (e.g. database, LDAP, etc...), and that'll cause the failure if they're not configured corectly. Other things get tested as while such as DI wiring, properties files etc...


    • #3
      Also, in terms of what we call integration testing with Spring, ability to test OR mappings, SQL and other queries, use of stored procedures and other use of the database. This is a very important area of potential failure that cannot be validated through unit testing.


      • #4
        The devil's in the wiring...

        Originally posted by unkreativ
        If all components work as expected why should fail something when "glueing" those together?
        If you had a pile of 5000 perfectly made bricks, could you guarantee the resulting house wouldn't fall down?

        It's true that some parts of your system are only testable using integration tests (usually the edge bits like DAOs and views), but it's also worth testing the "glue" in the middle, to make sure that each component is passing the correct messages to its collaborators. The web tier is a rich source of such problems, e.g. a view containing a slightly different target URL to the one configured in the URL mapper.