Andrew Lentvorski wrote:
Stewart Stremler wrote:
I'm seeing some hype about automated code-quality tests, and I'm
wondering if we aren't heading towards another annoying fad.

Maybe, but I just consider them to be Lint on Steroids. Fortunately, most of them are pretty innocuous.

I am starting to do things like set up nagios to monitor services that should be running and applying tests that should pass, even if everything isn't working yet. This way I know I am done when there are no more red alerts on the nagios page. I run nslint on the zone files every 5 minutes and get email if something breaks. I run cfengine to enforce that certain config files are a certain way and that certain symbolic links exist and that certain things are in /etc/hosts or resolv.conf and that certain binaries are on all of the systems and take action to fix it or alert me if something unfixable is wrong. I define a policy and it carries it out. It also restarts processes that should be running that are not.

Unit testing is along these lines also where you run tests (sometimes continuously, updating from svn/cvs and running the tests) and are alerted when something breaks. I am really starting to like the idea of intentionally creating certain dependencies all throughout the system (the system being the code, the hosts running the code, then network, the network supporting infrastructure, etc) that cause alarms to go off immediately when something breaks and the tests fail but do not themselves cause any system failures.

I think automated code-quality tests could have a place in such a system as well as long as you are allowed to dictate the policy because as evidenced by this thread everyone has a different opinion of what is quality. But if you were the manager of a big software project wouldn't you like your local revision control system to be able to run such tests on code that is checked in and automatically notify the programmer if it contains things that you the manager would not approve of? Seems like it would save you time. I don't approve of people making forward dns entries but no reverse. Without my nslint running every 5 minutes it would happen often.

With a complete system like this we are looking towards having much more automated and perhaps even self-healing (meaning something like cfengine adjusts the configuration back to what the policy dictates when something goes astray) systems. I tell my coworkers that my goal with all of this is Skynet. :)

--
Tracy R Reed
http://ultraviolet.org


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to