wood burning stoves 2.0*
The moose likes Testing and the fly likes Q 4 Mr. Hunt & Mr Thomas (5): unit test patterns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Q 4 Mr. Hunt & Mr Thomas (5): unit test patterns" Watch "Q 4 Mr. Hunt & Mr Thomas (5): unit test patterns" New topic
Author

Q 4 Mr. Hunt & Mr Thomas (5): unit test patterns

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 975
Dear authors,
This subject has really got me thinking now
In your opinion, do you think that unit tests
seen as small/manageable checks on the code might
eventually be used collectively in somekind of
pattern fashion, in order to perform
different specialized types of tests?
Or am I right off track here?
Best regards,
Gian Franco Casula


"Eppur si muove!"
Andy Hunt
Author
Ranch Hand

Joined: May 01, 2001
Posts: 54
How do you mean, exactly?


/\ndy Hunt<br /> <a href="http://www.PragmaticProgrammer.com" target="_blank" rel="nofollow">www.PragmaticProgrammer.com</a>
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 975
Well, I was thinking that unit tests
right now are set up by the programmer
according to prescriptions and
best practices that for example
your book provides.
But correct me if I'm wrong, I might
be saying nonsense right now, these
prescriptions might eventually be
consolidated in generic test suites
that the programmer might use as
a template for setting up his/her
tests. Just like patterns.
Thanks for bearing with me,
Gian Franco
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'm not sure if this answers your question, but...
You should treat your test code with the same amount of love than with production code. You should refactor your test code just like you refactor your production code, and this will eventually lead to some degree of "testing patterns."


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 975
Originally posted by Lasse Koskela:
You should treat your test code with the same amount of love than with production code. You should refactor your test code just like you refactor your production code, and this will eventually lead to some degree of "testing patterns."

Yep, that's the direction I was thinking in:
just wondering whether unit test experts
by seeing many programmers concocting their
own precious unit tests might be seeing
recurring testing patterns.
Thanks,
Gian Franco
[ February 19, 2004: Message edited by: Gian Franco Casula ]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Talking about testing patterns, there's a book coming out this spring that you might want to keep on your shopping list
Doug Wang
Ranch Hand

Joined: Oct 05, 2001
Posts: 445
Originally posted by Lasse Koskela:
Talking about testing patterns, there's a book coming out this spring that you might want to keep on your shopping list

Sounds interesting. Lasse, thanks for your recommendation.


Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 975
Thanks Lasse,
It took me some postings to formulate my thoughts,
and now I'm curious to see how they bring it.
Greetings,
Gian Franco
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Q 4 Mr. Hunt & Mr Thomas (5): unit test patterns
 
Similar Threads
refactoring with eclipse
Modifying Find
collections binarySearch: always return 1 ?
is using 'this' so un-justifiable in the context of performance
fitNesse vs junit