• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unit testing framework suggestions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unit testing framework suggestions?


  • Subject: Re: Unit testing framework suggestions?
  • From: Christian Pekeler <email@hidden>
  • Date: Sun, 26 Sep 2004 11:43:47 -0600

[sorry for the smime-less repost]

On Sep 26, 2004, at 5:59, Marcel Weiher wrote:
On 25 Sep 2004, at 16:32, Georg Tuparev wrote:
finally I came to the conclusion that the problem is exactly the one you discovered - separation of TestCase from the class being tested [well, in reality this is not always true -- but please read my replays to Marco I intend to write later today for more].

Yes, this was my impression as well, at first simply a conjecture and a code smell: parallel class hierarchies. Now that I've worked with JUnit for well over a year, I am absolutely convinced that my decision to allow the class to test itself for MPWTest was precisely right.

Parallel class hierarchies are a code smell if both hierarchies are production code. We're dealing with one hierarchy of production code and another one of unit testing code. To me, that doesn't smell.


In my experience, for anything but trivial systems, these two class hierarchies are not an exact mirror of each other. Often times I have more than one test class per production class. These test classes test different aspects of the production class and usually have different setups. Sometimes I also have a testclass to test the interaction between certain production classes. And other timed I don't have a test class for a production class at all because I only test what could possibly fail and what requires me to do TDD.


Christian

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Unit testing framework suggestions?
      • From: Marcel Weiher <email@hidden>
References: 
 >Re: Unit testing framework suggestions? (From: Tim Hart <email@hidden>)
 >Re: Unit testing framework suggestions? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: Unit testing framework suggestions? (From: Georg Tuparev <email@hidden>)
 >Re: Unit testing framework suggestions? (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: Unit testing framework suggestions?
  • Next by Date: Is there a way to get rid of the line at the bottom of a NSToolbar?
  • Previous by thread: Re: Unit testing framework suggestions?
  • Next by thread: Re: Unit testing framework suggestions?
  • Index(es):
    • Date
    • Thread