I am beginner in developing test cases, and want to follow good patterns for developing test cases rather than following some person or company's specific ideas. Some people don't make test cases and just develop the way their senior have done in their projects. I am facing lot problems like object dependencies (when want to test method which persist A object i have to first persist B object since A is child of B).

Please suggest some good books or sites preferably for learning design pattern for unit test cases. Or reference to some good source code or some discussion for Dos and Donts will do wonder. So that i can avoid doing mistakes be learning from experience of others.

link|improve this question
1  
@Mark: I don't know any of them and I'm very interested in what others will say about them in order to improve my technique in that particular field. Now I agree the question lacks of precision. Maybe we should suggest Maddy to precise his/her question? – Pierre 303 Dec 30 '10 at 12:16
2  
@Pierre that's why I asked the question in my first comment. – Mark Trapp Dec 30 '10 at 12:17
1  
Sometimes it just isn't practical to offer more precision or maybe the OP doesn't know enough to offer more precision. Maybe they are looking for design patterns to better understand how unit testing works because other examples aren't grokking for the OP. I certainly hope no one has voted to close this question as it could prove to be very useful. – Philip Regan Dec 30 '10 at 14:09
1  
@Michael: That close vote seems to be a little unfair here (please note I'm not blaming you here, I'm just "harumphing"). It is a question despite the fact it literally doesn't have a question mark at the end of it. I, personally, have searched for unit testing examples, and they are surprisingly hard to find if you don't know enough about them. If a question like this can't be asked here, then where else are we supposed to go? Harumph! – Philip Regan Dec 30 '10 at 15:00
2  
@Maddy - you should add your comments to your question. Your question is a little vague and adding more detail to your question will help. – Walter Dec 30 '10 at 16:11
show 15 more comments
feedback

2 Answers

up vote 8 down vote accepted

Xunit Test patterns, simply a must have.

link|improve this answer
Can u please refer some site to quickly start upon. I can read this book latter when i get time. – Maddy.Shik Dec 30 '10 at 12:27
3  
Explore the link a bit further, start for example at xunitpatterns.com/Organization.html – KeesDijk Dec 30 '10 at 12:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.