Results 1 to 4 of 4

Thread: Purpose of integration testing?

  1. #1
    Join Date
    Jul 2006
    Posts
    5

    Default 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].

    greets

    [1]: http://www.springframework.org/docs/...e/testing.html
    [2]: http://en.wikipedia.org/wiki/Integration_testing

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    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. #3
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  4. #4
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    668

    Wink The devil's in the wiring...

    Quote 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.
    Andrew Swan
    "Now is the EJB of our discontent made glorious Spring"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •