Suppose you got an order for making perfect wooden frame that can serve for fitting window. How would you proceed?
Traditional Approach
You trust your skills, you know client has budget that could satisfy costs for making of this frame. You ask client series of questions
- Where you want to fit this frame.
- What size should be frame made of
- Do you want it made with waterproof wood.
- What color would you chose for polishing this frame.
You got answers for above questions as follow
- In hall
- 4 Feet x 3 Feet, 3 inches thick.
- Yes
- Color which will suit hall
Well you didn't wish to built something like below, perhaps you don't know carpentry its your first time hence you built it that way. All those excuses but will client accept that. Definitely no.
What went wrong?
Or did you check every time while you was making it.
Lets learn it from Carpenter how to make wooden frame.
Preventive Approach
My father was a carpenter, while he used to create wooden frames i used to observe him. These carpenters have particular way of doing things lets explore those
If we observe both the frames above we would see many things that could have done better since the beginning which wouldn't have led you to that out of shape frame.
First build your units properly
If we see above wooden frame it consists of four woods cut in particular shapes and then joined together. You need to be precised while using chisel properly on edges of the wood so that you cut it in appropriate shape. I use to see my father use to measure the angle between edges with right angle tool every time he use to apply plane.
When making software it is very important that you are building its units flawlessly. This is the place where Unit Testing plays an important role. Unit tests ensure that you are keeping your units intact to the expectations every time you change some of its internals. Its like applying that right angle every time you use plane tool.
Next, Are your units compatible with units they relate?
Now that you have built your units its time to calibrate those units for their compatibility with their pairs (may be one or more). What would you ensure here. you would put two units together and check when they placed together fulfill part of your requirement. Here in case you would check if you place two adjacent woods together whether they form right angle as shown below.
This kind of verification is called as Integration Testing. Similarly while making software you need to ensure every change you make to any of its unit is compatible for its integrated counterparts.
There is this interesting case of Contract Testing which also plays important part of Integration testing. Suppose one of your joint is square groove and other unit which should be fit to this groove was round cylindrical extrude. They wont be compatible right. They don't abide with common contract. This is kind of testing which ensure your participating components abide each other with common contract.
Next, Does the Frame put together looks and feels what was intended by client
This are last piece of tests that you would like to ensure on above frame that it is broadly correct with respect to specification.
In software testing this is called as Functional testing
Do i need to check everything at every place?
If you observe above example closely the more efforts you spend testing primary units then integration very less you would need to spend on Functional part. This is called as Test Pyramid more you spend efforts on bottom part less you need to spend on top part.
What as a QA you can do to ensure that all Test are built properly?
Well to answer this question lets answer this first, in above case who knows it better that right angles of particular edges and 45 degree angle of other edges would lead to correct units, the one who know about quality. So you being QA can pair with developer to list what tests should be applied on various units integration and functional part.



No comments:
Post a Comment