Unit Testing a Server Configuration

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Unit Testing a Server Configuration

Post by Ollie Saunders »

It suddenly occurred to me last night after work that writing some unit tests for the server configuration would be a really good idea. I've recently had a freelancer configure our dedicated server and I noticed there were some bugs with some of the scripts he wrote and a couple of other things weren't quite correct.

Perhaps writing unit tests is a good idea. This way I can be more certain that everything is working, the tests can be executed every time I change something. In short unit tests could catch pretty serious problems very early. Its such a good idea I was amazed that a google search revealed nothing of interest.

Has anyone ever done this?
Do you think it is worth doing?
Are there any toolkits for doing such things?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

What sort of things do you want to test? Unit Testing a server configuration sounds a bit odd. More like acceptance/integration/integrity testing would be more fitting. Things like heatbeat, smokeping and sql integrity scripts can do that. But like I say, what did you want to test?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

  • PHP config
    • Extensions exist
    • Classes exist
    • Version
    • Error logging
    • Configuration values within acceptable range
  • MySQL config
    • Version
    • Settings (char encoding, ANSI mode)
    • User permissions
    • Works - a database and table can be created, data can be inserted and retrieved
  • Apache
    • Options Indexes is off where it should be
    • Domains newly created with script work and have correct settings
    • SSL works
    • Errors are logged in the correct place
    • Customized error messages work
I could make a more complete list if I had the configuration spec on me at the moment.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Oh ole - you unit testing nut! :-) I think it's a great idea - maybe if it had a front end that could edit the test config? I'd help with that eventually.

How's the sofa?
Post Reply