official poll - unit testing

J

john maclean

Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?"

Acceptable answers;

* Janet Jackme does my dishes cos I unit test all of the time
* I only unit test when < insert reason for testing>


--
John Maclean
07739 171 531
MSc (DIC)

Timezone: GMT
 
D

David Masover

Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?" [...]
* I only unit test when

I only unit test when I have enough of a concept of what I'm trying to build
that a test makes sense.

Places where I don't test:

- Vague prototypes. Tests are a way to describe how something should behave.
If I don't yet know how it's supposed to behave, I can't really write a test.
Sometimes, you just have to experiment.

- Tiny one-off scripts. Often, writing a test for these would require
duplicating most of what the script already does, and it's not likely to
contain any subtle bugs that you wouldn't find by just running it.

- UIs. Mostly because I haven't gotten around to learning Selenium or
anything similar. Also because this is the hardest place to automate testing,
and the easiest place to manually test.
 
M

Michael Malone

john said:
Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?"

Acceptable answers;

* Janet Jackme does my dishes cos I unit test all of the time
* I only unit test when < insert reason for testing>
In truth, I only unit test after something breaks. I guess I start
doing things thinking "this will only be a one or two line change" and
before I know it, I've added an extra module of code that is largely
based on old code, but just different enough to break it. I also find
that working in Ruby is counter-productive to working up the mental
drive to unit test. This is not me getting all fanatic about ruby (ok,
much) but it's true of other dynamic languages. I grew up on Java and C
and with that, one tends to get bogged down in so much detail trying to
translate behaviour into code, that testing is a nice, high-level view
of your program that validates your design to some degree. In dynamic
languages, things are already pretty high-level and the tendency here is
to believe that writing code correctly every time is about as difficult
as writing english sentences with correct grammar each time. A quick
run through the spell checker (ruby -wc) and everything's done, right?

So yes, it's probably the confidence I get from a dynamic language
_after_ C and the like that lets me believe that I've become a brilliant
coder overnight because I can suddenly parse strings quickly without
worrying about memory leaks, pointers and NUL chars (when I was at
university we had a 10% test dedicated to doing just that!). In short,
the bug minefields I trained to be extra-worried about no longer exist,
so setting up a Unit Test for the 'easy bits' mentally seems like more
effort than it's worth. Until it breaks. Part of solving the problem
is obviously defining the solution, to me, which is exactly where the
test comes!

It might be a slightly contradictory way of looking at things, but it's
certainly honest!

Michael

=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
 
T

Tom Cloyd

john said:
Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?"

Acceptable answers;

* Janet Jackme does my dishes cos I unit test all of the time
* I only unit test when < insert reason for testing>
And from whatever data you get what do you expect to infer?

This is waste of time. At most, you'll get a frequency distribution of
those who responds.

Meaning...what?

You cannot know.

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< (e-mail address removed) >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
J

Julian Leviston

Personally, bdd rocks.

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/

Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?" [...]
* I only unit test when

I only unit test when I have enough of a concept of what I'm trying
to build
that a test makes sense.

Places where I don't test:

- Vague prototypes. Tests are a way to describe how something should
behave.
If I don't yet know how it's supposed to behave, I can't really
write a test.
Sometimes, you just have to experiment.

- Tiny one-off scripts. Often, writing a test for these would require
duplicating most of what the script already does, and it's not
likely to
contain any subtle bugs that you wouldn't find by just running it.

- UIs. Mostly because I haven't gotten around to learning Selenium or
anything similar. Also because this is the hardest place to automate
testing,
and the easiest place to manually test.
 
E

Eleanor McHugh

Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?"

Acceptable answers;

* Janet Jackme does my dishes cos I unit test all of the time
* I only unit test when < insert reason for testing>

I only unit test for satirical effect.


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
 
J

john maclean

2009/4/2 Julian Leviston said:
Personally, bdd rocks.

Blog: http://random8.zenunit.com/
Learn rails: http://sensei.zenunit.com/

Hello,
My name is Mr Official and I am hereby asking you to participating in
my poll. "Do you really do unit testing?"
[...]

* I only unit test when

I only unit test when I have enough of a concept of what I'm trying to
build
that a test makes sense.

Places where I don't test:

- Vague prototypes. Tests are a way to describe how something should
behave.
If I don't yet know how it's supposed to behave, I can't really write a
test.
Sometimes, you just have to experiment.

- Tiny one-off scripts. Often, writing a test for these would require
duplicating most of what the script already does, and it's not likely to
contain any subtle bugs that you wouldn't find by just running it.

- UIs. Mostly because I haven't gotten around to learning Selenium or
anything similar. Also because this is the hardest place to automate
testing,
and the easiest place to manually test.

Julian,

Looks like you've just started your blog but when I search for bdd I
get a "undefined local variable or method `on_empty' for #". That
supposed to happen?


--
John Maclean
07739 171 531
MSc (DIC)

Timezone: GMT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top