Testing From Multiple Angles

I just read Doug Alcorn’s post on Dynamic Constants and Their Pitfalls. Maybe constructing an automated unit test isn’t possible, but this could be caught with static analysis tools if a policy is written that doesn’t allow dynamically constructing constant strings. If automated, then a developer doesn’t need to think about it – until the policy is violated. And in that case the scanner flags the code and loads it up in the IDE for review. It’s fixed.

Developers can run static analysis tools at any time, even against code that doesn’t compile or is not complete. Do you use static analysis tools? I don’t want to single out Doug, but rather ask the general question would static analysis have saved any time in this case? Would automated static analysis create enough value to complement unit testing? How does this work for you?

Andy

Advertisements

~ by Andy on March 26, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: