The Dopefly Tech Blog

Join Nathan Strutz as he shoots the breeze on techie geeky web dev stuff.

April
      1
2345678
9101112131415
16171819202122
23242526272829
30      

How do you organize your unit tests

posted under category: ColdFusion on May 18, 2015 at 2:32 pm by MrNate

In my rush to make unit tests on my work primary development application, I've been putting unit test files all over the place. I don't think this is necessarily bad, as I've been telling myself it's better to have unit tests in the first place. Certainly unorganized unit tests is better than no unit tests whatsoever. I have a somewhat organized unit test runner, and my tests all fall into a larger test suite that provides the illusion of organization, yet still the files themselves are not organized.

So what is the best method? Unit test files in the same package (CF term for a folder) as the files they are testing? Tests in a central location? Mixed in with the model? Outside of the application you publish?

My current mode of thinking is to pull them out into a separate project, sort of a "project-contrib" project, for things like documentation and unit tests that I need, but don't want to deliver to the production web server. What do you think? What's worked for you?

TIA.

(4 comments)
Nathan is a co-manager for the Phoenix CFUG (AZCFUG) and a ColdFusion application developer for an aerospace company in the Phoenix East valley (Mesa). Aside from doing ColdFusion applications, Nathan enjoys playing with servers, hacking with a variety of other programming languages and managing his home theater PC. Nathan got his programming start writing batch files in DOS.
This blog is also available as an RSS 2.0 feed. Click your heels together and click here to email Nathan.