Loading ...
Sorry, an error occurred while loading the content.

Integration Unit Tests

Expand Messages
  • Justin Gordon
    Matt wrote: I can see where you are coming from. I am used to doing acceptance tests as the integration style tests so we actually hit the databases with
    Message 1 of 1 , Mar 25, 2008
    • 0 Attachment
      Matt wrote:
      I can see where you are coming from. I am used to doing acceptance

      tests as the "integration" style tests so we actually hit the databases

      with those tests. Yes, mocking things out on integration tests would be

      super ugly IMO.


      How can you be sure that this is the case if you have mocks running

      around doing the work for you? Maybe I am confusing my notion of

      "acceptance tests" with your idea of "integration tests". When do you

      find it acceptable to mock things out and when do you not mock things

      out?

      Matt,
      I agree with you that if you put too much code in your mock objects, you'll spend too much time working out the bugs in your mock objects, not to mention the hassle of keeping then in-sync with the real objects.

      IPlease check out the "Dependent Object Framework". It solves the problem of setting up the database objects for JUnit tests: http://www.justingordon.org/2008/03/database-dependent-junit-tests-and.html

      Here's the summary of the article:
      Have you ever worked on a
      large enterprise software project (one that heavily uses a database)
      and wanted to add JUnit tests? And did you quickly realize that it�s
      easier said than done? Why is that? Want to learn a better way? If so,
      keep reading how a new open source project can solve this problem.

      Cheers,

      Justin





      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.