Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Andy Hunt
Author
Ranch Hand
Posts: 55
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you mean, exactly?
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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."
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic