|
Re: Possible FAQ answer (Re: Multiple Test Cases): msg#00190java.junit.user
> > 1.Do we need to create a Test-case class for every > > class we need to test. > > No. It is a convention to start with one TestCase class per class under > test, but it is not necessary. > > TestCase classes only provide a way to organize tests, nothing more. > Generally you will start with one TestCase class per class under test, but > then you may find that a small group of tests belong together with their > own > common test fixture.[1] In this case, you may move those tests to a new > TestCase object. Do not forget maintenance: keep tests easy to find. - myClass -> myClassTest since everybody expect a test class per class - add a comment in myClassTest.java file to specify where other relevant tests for this class are located. There's no rule here just common sense. -Vladimir -- Vladimir Bossicard www.bossicard.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Possible FAQ answer (Re: Multiple Test Cases), Mike Clark |
|---|---|
| Next by Date: | Re: Possible FAQ answer (Re: Multiple Test Cases), J. B. Rainsberger |
| Previous by Thread: | Re: addTestListener(), TestListener.startTest(), Vladimir Bossicard |
| Next by Thread: | Re: Possible FAQ answer (Re: Multiple Test Cases), J. B. Rainsberger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |