DEV Community

Discussion on: Testing Doing Harm

Collapse
 
jtenner profile image
jtenner

I think that not understanding specifications is the leading cause of testing failures. I have plenty of those problems in nearly all of my test suites, and it was because I was too lazy to start with a specification.

I am not proud of this.

I became aware of this when I started taking ADHD medication, and I saw the real world consequences each time I decided to shirk my responsibility. In this wake-up process, I decided to redesign, from the ground up, a canvas framework that I had already implemented so that I could put my money where my mouth is. Soon, I'll be able to report back and be proud of my work. That is not this day, sadly.

Given that my specification happens to be the CanvasRenderingContext2D prototype specification, it's a lot easier for me to define nearly all of the unit and behavior tests up front. Of course, this is not the case for others.

In the case that business software must be designed through an exploratory process, it necessary that standard operating procedure must be derived from a prototype. There is no good alternative unless you buy someone else's software.

Once the prototype is done, a set of specifications can be written by observing the good and bad things about such a solution.

That's when the real testing begins. You're building an Iron Man of your idea, so put it in the ring with everything you have.