Testing Configuration in an Automated Deployment Scenario

To day one of the QA’s shouted over to me about a tech debt card I’d played a few weeks on refactoring the build/deployment scripts and the config/properties files, I stupidly shouted back don’t worries about it!

Well some else on the team thought it might be prudent to do a quick check and although they didn’t find anything that would have broken the release they did find an issue with another part of the system. Which I’d introduced when pairing on the tech debt. So this got me thinking how best to test for configuration issue like this and other types of problems that might a rise.

Currently were using template files for our configs and a few other things where configuration changes between environments, now this is an easy thing to sort out in DEV/CI even QA but when you get into PRE and LIVE you can’t have these issues so how do make sure you don’t, well I think I’ve come up with a simple manual solution for now firstly run the deployment scripts and ensure the config files for PRE and LIVE can be created (QA will have been done a few time already automatically so any issue will have been caught). Then diff the PRE deployment properties file against the QA one ensure the values supplies in QA exist in PRE and where applicable are correct mainly server name and third-party links need to be check but also any debugging or caching is also a good one to double-check as there probably different in QA to PRE then diff PRE to LIVE and check again that the server names are correct along with third-party links and debugging/caching.There is one caveat to this it’s probably best to keep your properties files exactly the same apart from values e.g. everything property in QA is on the same line in PRE etc. This is why don’t recommend you diff against DEV and CI as there will be extra properties in these environments that are just building and running tests etc.

So in summary:

1) Check you can create your PRE and LIVE config files – which ensures your not missing any properties

2) Diff you QA –> PRE –> LIVE deployment properties files to ensure you have the correct setup values

Now as I like to make sure everything is automated as possible I’m going to go away and automate step 1.





Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: