Introduction to Defect Life Cycle:
In this tutorial, I will talk about the life cycle of a defect to make you aware of the various stages of a defect which a tester has to deal with while working in a testing environment.
I have also added the most frequently asked interview questions on defect life cycle. This is important to know about the various states of a defect for understanding the life cycle of a defect. The main intention of performing a testing activity is to check if the product has any issues/errors.
In terms of real scenarios, errors/mistakes/faults are all referred to as bugs/defects and hence we can say, that the main objective of doing a testing is to assure that the product is less prone to defects (no defects is an unrealistic situation).
Now, the question arises as what actually a Defect is?
What You Will Learn:
What is Defect?
A Defect, in simple terms, is a flaw or an error in an application that is restricting the normal flow of an application by mismatching the expected behavior of an application with the actual one.
The defect occurs when any mistake is made by a developer during the designing or building of an application and when this flaw is found by a tester, it is termed as a defect.
It is the responsibility of a tester to do a thorough testing of an application with an intention to find as many defects as possible so as to ensure that a quality product will reach the customer.
It is important to understand about defect life cycle before moving to the workflow and different states of the defect.
Hence, let's take know more about Defect Life Cycle.
So far, we discussed the meaning of defect and its relation in context to the testing activity. Now, let’s move to the defect life cycle and understand the workflow of a defect and the different states of a defect.
Defect Life Cycle in Detail
A Defect life cycle, also known as a Bug life cycle, is a cycle of a defect from which it goes through covering the different states in its entire life. This starts as soon as any new defect is found by a tester and comes to an end when a tester closes that defect assuring that it won’t get reproduced again.
It is now time to understand the actual workflow of a defect life cycle with the help of a simple diagram as shown below.
#1) New: This is the first state of a defect in the defect life cycle. When any new defect is found, it falls in a ‘New’ state and validations and testing are performed on this defect in the later stages of the defect life cycle.
#2) Assigned: In this stage, a newly created defect is assigned to the development team for working on the defect. This is assigned by the project lead or the manager of the testing team to a developer.
#3) Open: Here, the developer starts the process of analyzing the defect and works on fixing it, if required. If the developer feels that the defect is not appropriate then it may get transferred to any of the below four states namely Duplicate, Deferred, Rejected or Not a Bug-based upon the specific reason.
I will discuss these four states in a while.
#4) Fixed: When the developer finishes the task of fixing a defect by making the required changes then he can mark the status of the defect as ‘Fixed’.
#5) Pending Retest: After fixing the defect, the developer assigns the defect to the tester for retesting the defect at their end and till the tester works on retesting the defect, the state of the defect remains in ‘Pending Retest’.
#6) Retest: At this point, the tester starts the task of working on the retesting of the defect to verify if the defect is fixed accurately by the developer as per the requirements or not.
#7) Reopen: If any issue still persists in the defect then it will be assigned to the developer again for testing and the status of the defect gets changed to ‘Reopen’.
#8) Verified: If the tester does not find any issue in the defect after being assigned to the developer for retesting and he feels that if the defect has been fixed accurately then the status of the defect gets assigned to ‘Verified’.
#9) Closed: When the defect does not exist any longer then the tester changes the status of the defect to ‘Closed’.
- Rejected: If the defect is not considered as a genuine defect by the developer then it is marked as ‘Rejected’ by the developer.
- Duplicate: If the developer finds the defect as same as any other defect or if the concept of the defect matches with any other defect then the status of the defect is changed to ‘Duplicate’ by the developer.
- Deferred: If the developer feels that the defect is not of very important priority and it can get fixed in the next releases or so in such a case, he can change the status of the defect as ‘Deferred’.
- Not a Bug: If the defect does not have an impact on the functionality of the application then the status of the defect gets changed to ‘Not a Bug’.
The mandatory fields when a tester logs any new bug are Build version, Submit On, Product, Module, Severity, Synopsis and Description to Reproduce
In above list, you can add some optional fields if you are using manual Bug submission template. These Optional Fields include Customer name, Browser, Operating system, File Attachments or screenshots.
The following fields remain either specified or blank:
If you have authority to add bug Status, Priority and ‘Assigned to' fields then you can specify these fields. Otherwise, Test manager will set status, Bug priority and assign the bug to the respective module owner.
Look at the following Defect cycle:
The above image is quite detailed and when you consider the significant steps in bug life cycle you will get a quick idea about it.
On successful logging, the bug is reviewed by Development or Test manager. Test manager can set the bug status as Open, can Assign the bug to developer or bug may be deferred until next release.
When a bug gets assigned to a developer and he/she can start working on it. The developer can set bug status as won’t fix, Couldn’t reproduce, Need more information or ‘Fixed'.
If the bug status set by the developer is either ‘Need more info’ or Fixed then the QA responds with a specific action. If the bug is fixed then QA verifies the bug and can set the bug status as verified closed or Reopen.
Guidelines for Implementing Defect Life Cycle
There are some important guidelines which can be adopted before starting to work with defect life cycle.
These are as follows:
- It is very important that before starting to work on the defect life cycle, the whole team clearly understands the different states of a defect (discussed above).
- Defect Life Cycle should be properly documented to avoid any confusion in the future.
- Make sure that each individual who has been assigned any task related to defect life cycle should understand his/her responsibility very clearly for better results.
- Each individual who is changing the status of a defect should be properly aware of that status and should provide enough details about the status and the reason for putting that status so that everyone who is working on that particular defect can understand the reason of such a status of a defect very easily.
- Defect tracking tool should be handled with care to maintain the consistency among the defects and thus, in the workflow of the defect life cycle.
Next, let's discuss the interview questions based on the defect life cycle.
Important FAQs or Interview Questions on Bug Life Cycle
Q #1) What is a defect in the perspective of Software Testing?
Ans: A defect is any kind of flaw or error in the application that is restricting the normal flow of an application by mismatching the expected behavior of an application with the actual one.
Q #2) What is the major difference between Error, Defect, and Failure?
Ans: Error: If the developers find that there is a mismatch in the actual and expected behavior of an application in the development phase then they call it as an Error.
Defect: If testers find a mismatch in the actual and expected behavior of an application in the testing phase then they call it as a Defect.
Failure: If customers or end users find a mismatch in the actual and expected behavior of an application in the production phase then they call it as a Failure.
Q #3) What is the status of a defect when it is initially found?
Ans: When a new defect is found, it is in ‘New’ state. This is the initial state of a newly found defect.
Q #4) What are the different states of a defect in the defect life cycle when a defect is approved and fixed by a developer?
Ans: Different states of a defect, in this case, are New, Assigned, Open, Fixed, Pending Retest, Retest, Verified and Closed.
Q #5) What happens if a tester still finds an issue in the defect that is fixed by a developer?
Ans: The tester can mark the state of the defect as ‘Reopen’ if he still finds an issue in the fixed defect and the defect gets assigned to a developer for retesting.
Q #6) What is a producible defect?
Ans: A defect which is occurring repeatedly in every execution and whose steps can be captured in every execution, then such a defect is called as a ‘producible’ defect.
Q #7) What type of defect is a not reproducible defect?
Ans: A defect which is not occurring repeatedly in every execution and is producing only at some instances and whose steps as a proof have to be captured with the help of screenshots, then such a defect is called as a ‘not reproducible’ defect.
Q #8) What is a defect report?
Ans: A defect report is a document which includes reporting information about the defect or flaw in the application which is causing the normal flow of an application deviated from its expected behavior.
Q #9) What details are included in a defect report?
Ans: A defect report consists of the following details:
Defect ID, Description of the defect, Feature Name, Test Case Name, Reproducible defect or not, Status of a defect, Severity, and Priority of a defect, Tester Name, Date of testing the defect, Build Version in which the defect was found.
And the Developer to whom defect has been assigned, name of the person who has fixed the defect, Screenshots of a defect depicting the flow of the steps, Fixing the date of a defect and the person who has approved the defect.
Q #10) When is a defect changed to a ‘deferred’ state in the defect life cycle?
Ans: When a defect that is found is not of a very high importance and the one which can get fixed in the later releases are moved to a ‘deferred’ state in the defect life cycle.
This is all about Defect Life Cycle.
I hope you must have gained immense knowledge about the life cycle of a defect. This tutorial will, in turn, help you while working with the defects in the future in an easy manner.
Last Updated: August 21, 2019 5:32 am