Friday, 24 April 2015

Difference between load and stress - using a metaphor

Load or stress testing a component are two different test techniques that often get confused.  Here is an analogy which I have modified from a conversation I had with James O'Grady

A load test is driving the car for 874 miles at an average speed of 60mph, in 5th gear, while using the air conditioning, cruise control and CD player.  Using lots of the capabilities of the car at expected limits for a length of time.  During and at the end of the journey we would expect the car to still be operational and all the dials on the dashboard to be reading nominal values.  A stress test is a completely different type of test.

In a stress test we want to push the system beyond its limits.  Often the limits will not be clear and so often the test becomes exploratory or iterative in nature as the tester is pushing the system toward the limits.  If we reuse the driving analogy we might start the same journey but now drive at 70mph in 3rd gear.  Initially we think this might be enough to stress the car.  After 60 minutes we increase the stress by removing some of the car oil and deflating the tyres.  Now some of the dashboard lights are showing us that some of the car components are stressed.  We then remove some of the coolant fluid and remove a spark plug.  Now the car is seriously under stress.  All the lights are on and eventually the car gracefully stops operating and we are forced to steer to the hard shoulder.  Once safe we re-fill all the fluid and oil, re-inflate the tyres and repair the spark plug.  Now we are able to restart the car and resume our journey driving properly.

A stress test is pushing the system beyond the limits it is designed to run at either by restricting resources or by increasing the workload (or often both).  This is done until the system either gracefully shuts down or restricts further input until it is now longer under stress conditions.

Both tests are heavily contextual as it relies on a deep understanding on how the software will be used in the wild.  Will a customer use the software for a long period of time under a load condition or do they just use it in short bursts.  This question is more important when you consider software built in the cloud.

If your software is built in the cloud and you are re-deploying every 2 weeks then your view of load and stress testing will be different to testing an on prem application as the operational realities of using that software are contextually different.

Wednesday, 1 April 2015

I am a runner ...

I am still running.  Had a few weeks off while I recovered from chesty coughs and had to repeat a few weeks to regain fitness after the cough BUT.

I am a runner!

I know as Laura (the 'voice' of the NHS Couch to 5K podcasts) said I was.  She gives you this reward at the end of the last run of week 6 (25 mins of continuous running)  and it brings such a wave of emotion.  6 (or in my case a few more) weeks of hard physical exercise and mental fortitude to keep going finally pays off.  I am a runner.  I can run.  

I still have my goal of a 30 min 5K to achieve and I know to do that I have to build more pace and more stamina into each run.  However I have another 9 runs to do that in and it all feels achievable.  

Earlier in the course there are certain runs that fill you with horror as the length of time spent running is cruely ramped up.  The 3 min run in week 3, The 5 min run in week 4 and the largest of them all the first 20 min run at the end of week 5.  But I have conquered them and there are no more left, just a gentle increase in duration till we hit 30 mins.  Feel a little like Frodo after throwing the ring into mount doom.  The main obstacles have been completed.  Sure it is still a long way home to the Shire.  But I've got this far, I can keep going to the end.

I have also found out that sharing my progress has inspired two others to start running.  One is about to start week 4 and the other week 1.  I never EVER thought that me doing exercise would inspire someone else.  I was always the one that needed the inspiration to do anything physical.  

I've lost weight, my belts are all on the last hole and I need new trousers.  My shirts fasten around the collar and suit jackets are no longer straining the buttons.  This feels terrific.

If I ever meet Laura I owe her a drink.  The podcasts have tangibly changed my life and made me healthier where gyms and diets have failed.

Just need to keep running and finish what I started and do a sub 30min 5 K run.  But this is no longer a pipe dream.  It is realistic, the hard work is over I just need to keep going