Trust Me, You're Not Going to Write All Your Tests at the End of the Project

| | Comments (611) |

Don't wait until the end of a project to write tests. It doesn't work.

Writing tests is never urgent, but it is very important. Devotees of Stephen Covey will tell you this puts it smack in the middle of quadrant two: things that are important but not urgent.

Quadrant one, urgent and important things, prevent any other work from being done. Unfortunately, the final stages of any project are chock full of urgent and important things, like fixing bugs, building deployment packages, scheduling rollouts, and other fun. All these are important and urgent. If you haven't written automated tests at this point, don't start.

No manager will ever tell you, "Sure, we'll delay the launch by a week so you can write some code that won't ever be executed in production and has no bearing on the project making it out of QA".

So, if automated testing lives in quadrant two (it does), and that no real quadrant two work is possible at the end of a project (it isn't), you need to write your tests early, when quadrant two is in full effect, at the beginning of the project.

I'm not saying you need to do test driven development. That's hard. All I'm saying is that it's important that tests keep pace with code. Get in the habit of running coverage tools when you finish modules, and write tests before moving on.

If you do find yourself at the end of the project with no tests, don't panic. You're not a bad person. You're not a bad programmer. You just didn't write tests. Don't try to write them all at the end. You'll only get frustrated and stressed out.

Finish the project, fix any last-minute bugs, and deploy. After that you'll be back into quadrant two, and you can write all the tests you missed the first time around.

611 Comments

Matt Wilson Author Profile Page said:

Great post! I hadn't been subscribing to your blog before I saw this.

Would the man-hours spent on staffing a QA department be sufficient time to hire developers to write automated tests?

Aaron Author Profile Page said:

Matt, thanks for the encouragement!

As for your question, I think that hiring developers to ONLY write tests is a luxury for most shops. It would be awesome to have a small army of programmers focusing solely on exercising the system, but it's a hard sell.

On the other hand, I'm convinced that testing doesn't need to add time to projects, and that with practice and some good decisions, we can deliver well tested code in the same time as untested code.

John1483 said:

Very nice site!

PipIteplect said:

arguements against gambling [url=http://www.planetphotoshop.com/forum/member.php?u=7743]online gambling[/url] labor day ohio poker run

Your Web Site is really wonderful and I bookmarked it. Thank your for the hard work you must have put in to create this wonderful facility. Keep up the excellent work!

iertas9190 said:

Hello, my name is Jessica, I like yours blog, gut photo,
i with pleasure shall support a theme.

Tuaregus said:

Buy wireless phone, buying mobile phone, camera cellphone info, buy cell phone,
buy cellular phone, buy mobile phone, buy camera-phone, buy cameraphone ...
[url=http://bcellularphone.50webs.com] Buy cellular phone [/url]

ewfr4t5y6y said:

Hello, my name is Kelly, I like yours site, gut photo,
i with pleasure shall support a theme.

Bobi said:

Hi, I think that you is overdid. To look to bredshika, please.
http://medspills.110mb.com ">glucophage and weight lose

John682 said:

Very nice site!

John682 said:

If you have to do it, you might as well do it right
viagra

John682 said:

Great site. Good info
viagra

John682 said:

Great work,webmaster,nice design!
buy viagra

John935 said:

Very nice site!

John935 said:

If you have to do it, you might as well do it right
viagra

John935 said:

I want to say - thank you for this!
viagra

John935 said:

Beautiful site!
viagra

John935 said:

Great site. Good info
buy viagra

John935 said:

If you have to do it, you might as well do it right
cheap viagra

John935 said:

I bookmarked this guestbook. Thank you for good job!
viagra

John935 said:

Great site. Keep doing.
buy viagra

John935 said:

I want to say - thank you for this!
cheap viagra

John935 said:

It is the coolest site,keep so!
buy viagra

John935 said:

Excellent site. It was pleasant to me.
buy viagra

John935 said:

I want to say - thank you for this!
viagra

John935 said:

Great work,webmaster,nice design!
viagra

John935 said:

Great site. Good info
viagra

John935 said:

Nice site! Thank you!
cheap viagra

John935 said:

Great site. Keep doing.
viagra

John935 said:

Very interesting site. Hope it will always be alive!
viagra

John935 said:

It is the coolest site,keep so!
viagra

John935 said:

Great .Now i can say thank you!
viagra

John935 said:

Nice site! Thank you!
buy viagra

John935 said:

Nice site! Thank you!
viagra

John935 said:

Great site. Good info
cheap viagra

John935 said:

Perfect site, i like it!
viagra

John935 said:

Great site. Good info
cheap viagra

John935 said:

If you have to do it, you might as well do it right
cheap viagra

John935 said:

It is the coolest site,keep so!
buy viagra

John935 said:

Great work,webmaster,nice design!
cheap viagra

John935 said:

I want to say - thank you for this!
cheap viagra

John935 said:

Excellent site. It was pleasant to me.
cheap viagra

John935 said:

Great .Now i can say thank you!
cheap viagra

John935 said:

Great site. Good info
buy viagra

John935 said:

If you have to do it, you might as well do it right
viagra

John935 said:

Great work,webmaster,nice design!
buy viagra

John935 said:

I want to say - thank you for this!
cheap viagra

John935 said:

Great site. Keep doing.
viagra

John935 said:

It is the coolest site,keep so!
viagra

John935 said:

Great site. Keep doing.
viagra

John935 said:

Nice site! Thank you!
viagra

John935 said:

Very interesting site. Hope it will always be alive!
viagra

John935 said:

I want to say - thank you for this!
viagra

John935 said:

Great work,webmaster,nice design!
buy viagra

John935 said:

Excellent site. It was pleasant to me.
viagra

John935 said:

If you have to do it, you might as well do it right
cheap viagra

John935 said:

If you have to do it, you might as well do it right
viagra

John935 said:

It is the coolest site,keep so!
viagra

John935 said:

Perfect site, i like it!
viagra

John935 said:

Incredible site!
viagra

John935 said:

Excellent site. It was pleasant to me.
buy viagra

John935 said:

Excellent site. It was pleasant to me.
cheap viagra

John935 said:

Great site. Good info
cheap viagra

John935 said:

If you have to do it, you might as well do it right
viagra

John876 said:

Very nice site!

John876 said:

I bookmarked this guestbook. Thank you for good job!
buy viagra

John876 said:

Perfect site, i like it!
viagra

John876 said:

Great site. Good info
cheap viagra

John876 said:

Great work,webmaster,nice design!
viagra

John876 said:

If you have to do it, you might as well do it right
viagra

John876 said:

Very interesting site. Hope it will always be alive!
cheap viagra

John876 said:

Great site. Keep doing.
buy viagra

John876 said:

Perfect site, i like it!
cheap viagra

John876 said:

It is the coolest site,keep so!
cheap viagra

John876 said:

It is the coolest site,keep so!
viagra

John876 said:

I want to say - thank you for this!
viagra

John876 said:

I want to say - thank you for this!
viagra

John876 said:

Beautiful site!
viagra

John876 said:

It is the coolest site,keep so!
cheap viagra

John876 said:

Nice site! Thank you!
cheap viagra

John876 said:

I bookmarked this guestbook. Thank you for good job!
buy viagra

John876 said:

Great .Now i can say thank you!
viagra

John876 said:

Great site. Keep doing.
buy viagra

GoogleBot said:

DAESH ONOTOLE V PRAVITELI VSELENNOI!

John876 said:

Great site. Keep doing.
viagra

John1172 said:

It is the coolest site,keep so!
viagra

John876 said:

It is the coolest site,keep so!
buy viagra

John876 said:

Great site. Good info
cheap viagra

John1172 said:

Excellent site. It was pleasant to me.
viagra

John1172 said:

If you have to do it, you might as well do it right
cheap viagra

John1172 said:

Great .Now i can say thank you!
viagra

YahooBot said:

Nice site, thanks for information!

John876 said:

Very interesting site. Hope it will always be alive!
cheap viagra

John1172 said:

Great work,webmaster,nice design!
cheap viagra

John876 said:

Great site. Good info
buy viagra

John1172 said:

Great work,webmaster,nice design!
buy viagra

John1172 said:

Perfect site, i like it!
viagra

John876 said:

Nice site! Thank you!
cheap viagra

John1172 said:

Great .Now i can say thank you!
viagra

John1172 said:

It is the coolest site,keep so!
buy viagra

John876 said:

I bookmarked this guestbook. Thank you for good job!
viagra

John876 said:

Nice site! Thank you!
buy viagra

HairyMan said:

Not bad... Not bad.

John1172 said:

Great .Now i can say thank you!
buy viagra

John1172 said:

I bookmarked this guestbook. Thank you for good job!
viagra

John215 said:

Beautiful site!
viagra

John1172 said:

Great .Now i can say thank you!
cheap viagra

John1172 said:

Nice site! Thank you!
viagra

John215 said:

Very interesting site. Hope it will always be alive!
viagra

John1172 said:

Great .Now i can say thank you!
viagra

John1172 said:

Very interesting site. Hope it will always be alive!
cheap viagra

John215 said:

Excellent site. It was pleasant to me.
buy viagra

John1172 said:

Nice site! Thank you!
cheap viagra

John215 said:

Great work,webmaster,nice design!
viagra

John1172 said:

If you have to do it, you might as well do it right
cheap viagra

John215 said:

Great site. Good info
viagra

John1172 said:

Great work,webmaster,nice design!
viagra

John994 said:

If you have to do it, you might as well do it right
buy viagra

John1172 said:

Great site. Good info
cheap viagra

John215 said:

Great site. Good info
cheap viagra

John1172 said:

If you have to do it, you might as well do it right
cheap viagra

John215 said:

Great site. Good info
viagra

John1172 said:

Great site. Good info
buy viagra

John1172 said:

It is the coolest site,keep so!
cheap viagra

John994 said:

Perfect site, i like it!
viagra

John1172 said:

If you have to do it, you might as well do it right
viagra

John994 said:

Great site. Good info
buy viagra

John1172 said:

Excellent site. It was pleasant to me.
cheap viagra

John994 said:

Incredible site!
viagra

John215 said:

If you have to do it, you might as well do it right
cheap viagra

John1172 said:

Nice site! Thank you!
viagra

John1172 said:

I want to say - thank you for this!
viagra

John994 said:

I bookmarked this guestbook. Thank you for good job!
viagra

John215 said:

If you have to do it, you might as well do it right
viagra

John994 said:

Great .Now i can say thank you!
viagra

John1172 said:

Great site. Good info
viagra

John986 said:

Nice site! Thank you!
viagra

John215 said:

Great site. Good info
buy viagra

John1172 said:

Beautiful site!
viagra

John1172 said:

Excellent site. It was pleasant to me.
cheap viagra

John215 said:

Beautiful site!
viagra

John1172 said:

Perfect site, i like it!
viagra

John986 said:

If you have to do it, you might as well do it right
buy viagra

John1172 said:

Great site. Keep doing.
viagra

John215 said:

It is the coolest site,keep so!
viagra

John986 said:

Beautiful site!
viagra

John1172 said:

Perfect site, i like it!
viagra

John215 said:

Great site. Keep doing.
buy viagra

John1172 said:

If you have to do it, you might as well do it right
viagra

John1172 said:

I want to say - thank you for this!
buy viagra

John986 said:

Great .Now i can say thank you!
viagra

John215 said:

Great site. Good info
viagra

John1172 said:

Nice site! Thank you!
cheap viagra

John1002 said:

Great site. Good info
buy viagra

John1172 said:

Great work,webmaster,nice design!
cheap viagra

John215 said:

Great site. Good info
buy viagra

John1002 said:

Perfect site, i like it!
buy viagra

John716 said:

Very interesting site. Hope it will always be alive!
buy viagra