DEV Community

Discussion on: What are your biggest problems with unit testing?

Collapse
 
jgrahamuk profile image
Joshua Graham

I suppose you could refuse their business or refuse to support them, but I'm a bit more interested in educating and sharing the value of testing.

It's a concept that doesn't have a lot of direct parallels in other fields. If your plumber suggested installing a test unit in your toilet to make sure they did the job right you'd probably be a little dubious. 😁

Most don't outright ask for a quote without those things, they just don't understand what they are or why they're paying for them.

Thread Thread
 
teachingtls profile image
teachingtechleads

I'd challenge the idea that other fields don't test. That toilet was meticulously tested in development. The flange the plumber is installing was tested against multiple toilet models. When the plumber finishes their installation, they're going to turn the water back on and flush the toilet a few times.
All different kinds of testing : unit, integration, and acceptance or e2e.

Thread Thread
 
jgrahamuk profile image
Joshua Graham

Interestingly, I had this exact same conversation with someone else after this discussion. We came to a similar conclusion.

Unit tests are like machines that test other machines. It's like that Ikea drawer they claim you can open and close over 1 million times. How do they know you can open and close it over 1 million times? They have a machine that opens and closes the drawer a million times.

Thread Thread
 
teachingtls profile image
teachingtechleads

Correct. Perhaps it's the development community which is behind on the notion of wrapping in testing with their day to day work. Seemingly everyone else does it on the regular.