Introduction
Imagine one day there is a guest who is about to come at your home for dinner.
You cooked the dinner and you did not taste it or check it whether it is tasty or not and when your guest arrives at your home , you serve him the food.
The food taste was bad and salt was too much in the food , the guest was not able to finish the food and he felt bad about the food which you served him. And he went back to his home angrily.
Next time if you call him to your house he won't be pleased to come.
Same was goes the testing, if you provide your client with a product which developed properly but testing was not done nicely , your client will also become unhappy and will be angry with you or even can sue you for this.
So, comes the big question What is testing ,How it is done and How to approach a testing problem?
What is Testing?
To be very honest ,
Testing is an
art and
Tester is an
artist or you can say
finding bugs in an is a
magic and
Tester who finds it is a
magician.
Testing is very important part of any kind of development of product be it software , hardware or anything.
eg. You need to test your app before uploading on playstore.
You need to test the building walls when the construction is taking place and also when it is done.
You need to test the medicines and injections before giving it to the patient.
All of the above mentioned things can fails and result to abnormality if the testing is not done properly.
How Testing is done?
There are multiple ways of doing testing which ranges from manual to automated , black box to white box testing.
1)Manual Testing or Black Box testing :
Just testing something for its functionality is called Manual testing where you don't check the logic or anything , you just check whether the functional behaviour or output of the testing product is correct or not.
Suppose you have to test a product in which when you give that product any image , it transforms it into black and white image.
The manual test case for such a product will be just you are giving it an image manually and checking whether obtained image is black and white or not.
If it is then this test case is passed else this test case will fail,
2)Automation testing :
Just automating the test cases where manual effort required is very less ,
where you can write some test scripts which will run and perform the test cases.
Now for the above mentioned product , you write some scripts which by itself takes the image from a folder and uploads and somehow check for the grey-scale content will be automation script for it.
Tools/Technologies for doing automation testing :
a)Appium
b)UI Automator
c)Selenium and etc.
3)Unit Testing or White Box testing :
Testing something on code level is called White box testing where you check the logic.
The tester has the knowledge of the internals of a system and knows how the system is implemented. The tester uses this knowledge to develop test cases that will examine the control flow, information flow, data flow, exception and error handling as well as coding practices of the system.
The unit test case for the above product can be , checking for the functions at the code level whether it is returning correct value or not.
eg. For doing calculator unit testing you will send 2+2 to function and check whether the function is returning 4 or not.
How to approach a testing problem?
Many a times in interview or in general discussion you could be ask how will you test Product X then how will you tell or how you should proceed.
It is quite simple go step by step.
Like if I say you have to give a feedback or you have to test a food , then what will you do ?
I guess you will do following ?
1)Check for the look.
2)Check for the smell.
3)Check for the oil quantity.
4)Check for taste.
5)Check whether it is hot or cold etc.
Same way you can approach a testing question of any product.
Every Product comprises of following properties :
1)U.I. or look
2)Functionality
3)Reliability
4)Performance(stress , boundary value analysis)
You have to classify your product on the basis of above mentioned 5 points and you can write test cases.
Below I am providing you one example .
Test cases for Bluetooth speaker (eg. JBL)
1)UI or look
a)Check whether JBL is printed on it or not and there should be no spelling mistake.
b)Check whether the name on scratching does not go away.
c)Check whether the color lets say black if proper or not.
d)There should be no stain on the speaker
e)Check for the shape whether it is of black color or not.
2)Functionality
a)Check whether is getting easily connected with device or laptop or not.
b)Check whether the song is played nicely or not
c)Check whether there is no sync issue.
d)Check whether it is easily getting disconnected or not.
e)Check whether on clicking next button pause button play button all are working or not.
f)Check whether you can receive call and whether the call is successful not.
g)Check whether it can get connected to multiple devices or not.
3)Reliability
a)Check whether the material used in it is harmful or not.
b)Check whether it does not have sharp edges.
c)Check whether it does not get short circuit.
4)Performance
a)Stress/Negative test case
i)Keep on changing the tracks or continuous click on next and check whether song displayed on phone and played on the speaker is same or not.
ii)Keep on connecting and disconnecting and check whether it is behaving properly or not.
iii)Take it to a very hot temperature and check whether it does not melt.
iv)Make it fall from small height and check whether it does not fail.
b)Boundary value
i)Check for the range in which it is played , take to the edge and check whether it is working or not or it is not working in within range also.
ii)Check for the mentioned duration that whether on full charging speaker if working for that many time or not.
iii)Check whether on keeping idle in how many time it turns off.
Above is just few testing steps for Bluetooth speaker , it can be many more as Testing is a never ending process.
You can think of your own.
But one thing I can guarantee you that if you classify your products properly then you can write its test cases very well and this can help you in any discussion or interview just go step by step.
NOTE :
As I told you Testing is a never ending process so you can classify your product in many more parts , not only in above mentioned parts.
The above mentioned parts were just for your understanding.
That's it for today guys . Hope you liked it.
Please let me know if anything is wrong , missing or not clear.
Next time I will be covering types of testing and few more test cases for few more products that can help you.
Keep reading.
Keep learning.
Thanks a lot for reading.
Stay Connected.
-Anurag Srivastava