We all make mistakes, as we are only humans. Sometimes we make some small errors or mistakes which can be neglected but there are times when we make a huge mistake which has bigger consequences.
Software testing is a process designed to evaluate the performance and functionality of the software. It is also used to check whether the desired requirements are met or not and also to identify the bugs and defects to make the software work perfectly.
The definition of Software testing according to IEEE 1059 is a process of analyzing a software item to detect the differences between existing and required conditions (i.e., defects) and to evaluate the features of the software item.
Generally, there are two types of software testing, one is Manual testing and Automation testing. In manual testing, the tests are performed manually to find any defects and the tester takes a "real user" approach when performing the manual testing. While in the automation testing automation tools are used to find the bugs and defects in the software. The tester has to execute the test scripts and the rest is done automatically. In most of the cases, the testing is executed in a systematic fashion.
What is the Software Testing Life Cycle?
The testing process used to test the software is executed in sequential and planned steps, this is called the Software Testing Life Cycle. Simply put, the process of software testing contains a set of activities which are carried out in a certain manner. In Software Testing Life Cycle (STLC) many activities are executed to check the quality of the product and improve it.
Different methodologies are used in Software Testing Life Cycle, it also involves 6 different phases and an entry & exit criteria.
There are 6 phases involved in Software Testing Life Cycle:
- Requirement Analysis
- Test Planning
- Test case development
- Test Environment setup
- Test Execution
- Test Cycle closure
Each stage has an entry and exit criteria and different activities associated with it.
Entry Criteria: It gives the list of prerequisite items that must be finished so that the testing can begin.
Exit Criteria: It defines those items that must be accomplished or finished so that the testing can be finished.
Once you enter a stage or a phase by meeting the Entry criteria you need to finish all the steps listed in the exit criteria in order to move to the next step. Now let’s discuss the methodologies of Software Testing Life Cycle.
Methodologies of Software Testing Life Cycle
Before jumping to the topic let’s discuss what is the meaning of methodology first. A methodology is a system of methods used in a particular area of study or activity. It can also be said as a model which will be followed in a particular process. In software testing, it means the methods that are being adapted to carry out the different processes of software testing.
There are 4 types of methodologies or model:
- Agile Model
- Waterfall Model
- V Model
- Spiral Model
In the agile model prolonged iterations of testing and developments take place across the whole software testing life cycle. it is the most trending model nowadays. In this model, customers are allowed to look into the project to make a particular decision. Customers can make changes in the project to improve it and make it defect free.
In other words, the error that is found during the testing can be fixed or edited on the spot without interrupting the testing process.
Every iteration in this model has a particular testing phase. Agile model is most beneficial for small projects as they can be implemented very quickly using this methodology.
The agile model for software testing focuses on four main values:
- It collaborates with the customer rather than contract negotiations.
- It involves both team and individual interaction over tools and processes.
- It allows responding to certain changes rather than following a particular plan.
- It emphasizes working software rather than comprehensive documentation.
Some of the features of the Agile model are:
- In the agile model, the processes are broken into various individual models so that developers can work on them separately.
- It proposes an iterative and incremental approach for software testing and software development.
- It allows the customer to have an early look at the project and make frequent decisions and changes to it.
- The agile methodology is considered a somewhat unstructured model when compared to the rest of the models.
- The bugs, errors, or defects can be fixed between the testing process.
- It involves less planning and the project, or the testing process is executed within iterations of a short period of time (2–4 weeks).
- In an agile model, documentation is given less priority than software testing and software development processes.
- In Agile Testing, the developers and testers work together.
- After completion of every iteration, acceptance from the user is performed.
- The agile model works better when the organization or the company have positive contact with the customer.
The agile methodology involves various steps such as the feasibility study, requirement analysis, system analysis, specification, system design, development, testing, implementation, maintenance, and review.
The most valuable benefits of employing the agile methodology are more control, better productivity, better quality, higher customer satisfaction, and a higher return on investments which are some of the most important features required in a business or an organization.
The phases involved in Agile methodology are shown in the picture below.
The Waterfall Model was one of the first Process Models that was introduced. It is really simple and easy to use. It works just like a waterfall flowing in a downward direction. In this model, each phase should be completed before the execution of the next phase which means that there is no overlapping of phases.
The Waterfall model consists of 5 phases and each phase is executed one after the other in the order: Requirement, Software design, Implementation, Testing and then Maintenance.
In the first phase namely the requirement phase, all the requirements are defined before the testing is started. In the next phase namely the software design phase, the workflow of the project is designed by the developers. In the Implementation phase, the planned work from the Software design phase is implemented. Next comes the testing phase where the functionality of each module is tested as per the requirements.
The next phase which is the Maintenance phase, this is a never-ending phase. In this phase, the developers fix the problems which arise over time with the use of the software. When a defect arises, the developer fixes the defect and the software goes back to testing, this is continued until all the defects are fixed.
Phases involved in the Waterfall model
The waterfall model is easy to understand and simple to implement but it is not as useful as it was before. This is because the technology has advanced so much and newer models are much more efficient to use.
The main problem with the waterfall model is that it assumes that the requirement that is specified by the users can be done in advance and there is no role of user apart from specifying requirements.
Nowadays considerable feedbacks are also taken from the users and the requirements can also change and grow throughout the process.
The main advantages of using a waterfall model are:
- It has a review process and specific deliverables for each phase.
- The phases are executed one at a time and no overlapping takes place.
- It works well for those projects where the requirements are well understood and do not change throughout the process.
- It brings back the idea of ‘define before design’ and ‘design before code’.
Some of the disadvantages of the waterfall method are:
- It does not show good results for projects that are long.
- It comes with a high amount of uncertainty and risk.
- It works poorly for the projects in which there is a moderate or high risk of requirement changes.
- It works poorly for the projects which are object-oriented and complex.
- If the scope is adjusted during the life cycle then the whole project can be killed.
- The working software is created in the late stages of the life cycle.
From the above discussion of the advantages and disadvantages of the waterfall model, it is very well clear that the waterfall model can be used in:
1. Projects in which the requirements are specified clearly and no changes in requirements take place throughout the process. This is the case of small projects such as defense projects where the requirements are clear from the beginning.
2. Projects where the testing activities are performed by the sponsor itself.
The waterfall model is an old and outdated model which has many disadvantages and limitations. So, in order to overcome those limitations, the V model is designed.
The V model is also known as the Verification and Validation model. It is considered as the extension of the waterfall model. In the V model, the tasks are performed in tandem. It shows the activities of Software development on the left-hand side and the testing phases that are being performed are shown on the right-hand side.
It means that each phase involved in the software development cycle is directly associated with the software testing phases. This model also follows the waterfall style as there is no overlapping of phases and the next phase starts after the complete execution of the previous phase.
In this model, the planning of the testing phase has to be done parallel to the software development phase. After the designing or the planning phase, the verification phase starts followed by the coding phase and then the validation phase.
In the verification phase, the requirements and expectations are taken care of. The system and architectural design are then done according to the noted customer expectations and requirements.
The module design also takes place in this phase and it is ensured that all the modules are compatible with each other. Then after the completion of the verification phase, the coding phase begins in which the actual coding is done and implemented.
The coding is done on the basis of the standards and the guidelines. After the Coding phase, the validation phase starts. The software is tested, the unit testing, integration testing, system testing, and acceptance testing is performed to ensure that the software works as per the requirement and expectations of the customer and also to make sure that it is defect-free.
Different Phases involved in the V Model
The advantages of the V-model are similar to that of the waterfall model.
- It is easy to understand and simple to use. Its simplicity makes it even easier to manage.
- No overlapping of phases takes place.
- Works very well for projects where the requirements are well understood like in smaller projects.
- It has a specific review process and deliverables for each phase.
The disadvantages of V-model are:
- High uncertainty and risk.
- Not good for projects that are object-oriented and complex.
- Not good for long projects.
- Not good for the projects where there is a moderate or high chance of requirement changes throughout the process.
From the above discussion of advantages and disadvantages, it is fairly obvious where we can use the V model for the best results.
In the above two models, the V model and the waterfall model are good only for smaller projects where the requirements are very well specified. For larger projects, the spiral model should be used.
This model is the combination of the sequential linear development model and iterative development process model. This means that it is similar to the waterfall model with an emphasis on risk analysis. In the spiral mode, a particular activity is done in one single iteration, this is called a spiral.
The same things are done for all the spirals that are designed in order to build the entire software. The Spiral model involves 4 phases namely the Planning phase, the Risk analysis phase, the Engineering phase, and the Evaluation Phase. These phases are of the same type which is involved in the waterfall model the only difference is the risk analysis phase in the Spiral model.
Phases involved in the Spiral Model
The advantages of the Spiral model are:
It allows the usage of prototypes extensively.
- It allows the accommodation for the required changes, unlike the last two models where the requirements should be specified very clearly and should not change throughout the process.
- It allows users to check the system very early.
- More accurate capturing of requirements.
- It allows dividing the development process into smaller parts so that the parts which are riskier can be developed earlier which leads to better and precise risk management.
With some advantages there comes certain disadvantages as well. some of the disadvantages of the Spiral model are:
- The management of this model is more complex than the others.
- The process involved is also complex.
- The date on which the project will be finished cannot be known early.
- Not suitable for projects involving low risk because it can be expensive and redundant for them.
- The spiral iteration can go on indefinitely.
- It needs excessive documentation because of many intermediate stages.
So, the Spiral model is ideal for the projects involving high risk and where the chances for changing in requirements are high. It can also be employed on the project in which the customer is not sure about their requirements at first.
The Phases of the STLC
The Software Testing Life Cycle is executed in a sequential manner. It involves six different phases:
- Requirement Analysis
- Test Planning
- Test Case development
- Test environment setup
- Test Execution
- Test Cycle closure
Each of the phases involves different entry criteria and exit criteria. Certain Deliverables and activities are also associated with each phase.
Requirement Analysis - Phase in Software Testing Life Cycle
It is the first step involved in Software Testing Life Cycle. In this phase, all the requirements are identified which needs to be tested. The Quality Assurance team interacts with stakeholders like clients, system architects, Technical leads, Business analysts etc. They understand the requirements and expectations of the stakeholders so that the tests can be designed according to the requirements of the customer. These requirements can be either non-functional or Functional like Security testing or performance.
The entry criteria in the Requirement analysis phase are:
- The following documents have to be available: Requirement Specification and Application Architectural.
- The acceptance criteria need to be well defined along with the availability of the above documents.
Some of the Activities involved in this phase are:
1. Preparing the list of queries or question that needs to be resolved from the client, System architecture, technical manager, business analyst, etc.
2. Making the lists of all different types of tests that are performed like security, performance and functional, etc.
3. Defining the testing priorities and focus.
The Deliverables which is associated with this phase are:
1. Report on Automation feasibility if it is required.
2. The answers to all the listed question which are resolved by the stakeholders which means getting the list of testable requirements.
Test Planning - Phase in Software Testing Life Cycle
Test Planning is the most important phase in Software Testing Life Cycle (STLC). In this phase, all the testing strategy which will be used for testing the software are defined.
This phase is also known as the Test Strategy phase. In this phase, the cost estimates and efforts for the entire project are determined by the Test lead or Test manager (varies from company to company).
Once the requirement phase is completed the test planning phase starts and the test plan is prepared based on the analysis of the requirements gathered from the requirement phase. The test plan is the result of the test planning phase.
The test phase is also known as Testing Effort estimation or Test strategy document. After the completion of the Test phase, the test case development activity is started by the Quality Assurance team. This is the first phase of the actual testing tasks. This phase gives the answer to the question “what is to be tested” and “what resources or things are required for the testing”.
The Entry Criteria for the Test planning phase is:
- Requirements documents (the updated version of missing or unclear requirements).
- A report on automation criteria should be available.
The activities associated with the Test Planning phase are:
1. Defining the scope and objective of the experiment.
2. Listing the types of testing associated with the Software Testing Life Cycle.
3. The estimation of test effort and planning for resources.
4. Selecting the tools for testing if required.
5. Defining the overview of the testing process.
6. Preparing the schedules for the test.
7. Defining the environment for the test required for the entire project.
8. Determining responsibilities and roles.
9. Listing the deliverables of the testing.
10. Defining the risk associated if any.
11. Defining the suspension criteria, exit criteria, resumption criteria, and entry criteria.
The deliverables in the test planning phase are:
1. Test Strategy or Test Plan document.
2. Document for the estimation of the Testing efforts.
Test Case Development - Phase in Software Testing Life Cycle
After completion of the Test planning phase, the Quality Assurance team starts developing the test cases. The main goal of the Test case development phase is to create test cases for every individual unit. In this phase, the testing team defines all the test cases in detail.
These structural and functional test cases also cover the validation, functionality, and points of verification provided in the Test Plan. Along with creating the test cases the testing team also creates the test data for testing if required.
The test cases are written in a stepwise approach by the Quality assurance team. This is later reviewed by the business analyst and certain modifications are also done if necessary. After the confirmation of test cases, the Quality Assurance team creates the test data on the basis of preconditions.
The entry criteria for the Test case development phase is:
- The requirements documents (the updated version of missing or unclear requirement).
- The report on Automation feasibility.
The Activities involved in the Test case development phase are:
1. Preparing the test cases.
2. Preparing the test automation script if it is required.
3. Enumerating the possible actions of the users and their objective.
4. Setting the priorities of test conditions.
5. Selecting the condition under which testing will take place.
6. Documenting test conditions.
7. Verifying and correcting the test cases on the basis of modifications.
The deliverables associated with the Test case development phase are:
1. Test cases
2. Test data
3. Test automation script
Test Environment Setup - Phase in Software Testing Life Cycle
This phase consists of setting the environment for testing. It is a very important part of the Software Testing Life cycle. The test environment defines the conditions on which the software will be tested. This is an independent activity; therefore, it can go parallel with the Test Case development phase.
The test environment varies from company to company, in some cases, the company developer sets up the testing environment while in others, the customer sets up the test environment. In any case, the test team does not participate in creating the test environment.
This is because the test team can create a test environment which will be favorable to the software and to the organization, but the customer sets up the test environment according to their needs and requirements which is the ultimate goal.
While the test environment is being -prepared by the customer or the developer, the testing team prepares for smoke testing. The smoke testing is performed to validate the test environment, it checks the readiness and stability of the test environment.
The entry criteria for the Test environment setup phase are:
- The test plan should be available.
- Cases for the smoke test should be available.
- The test data should be available.
The activities involved in the test environment setup phase are:
1. Setting up the test environment.
2. Analyzing the requirements and preparing the list of required hardware and software in order to set up the test environment.
3. Executing the Smoke test after the completion of the Test environment set up to validate the readiness and stability of the test environment.
Test Execution - Phase in Software Testing Life Cycle
After developing the test case and creating the test environment he only thing left is executing the tests. In this phase, the test cases are executed by the testing team on the basis of test cases and test planning which is prepared in the previous phases namely the Test planning phase and the test case development phase.
The test cases which are passed are marked accordingly. When a test case fails, its corresponding defect or bug is reported to the team of developers using a bug tracking system.
These bugs can also be linked to a corresponding test case for later usage. In an ideal case, a bug is associated with every failed test case. After the development team have fixed the bug, the same test case is again executed to check whether it’s really fixed, and it works as per the conditions provided.
Some test cases are marked as Blocked due to some defect. A report is created in which the number of passed, blocker, failed or not run etc. test cases are shown.
The entry criteria for the test execution phase is:
- Documents of Test strategy or Test Plan
- Test cases
- Test data
The activities involved in the test execution phase are:
1. Marking the status after executing the test cases like failed, passed, blocked or not run etc.
2. Executing the test cases according to the test planning.
3. Assigning the bug Id for every blocked or failed test cases.
4. Retesting of the blocked and failed test cases after the bug is fixed.
5. Tracking the defects to the closure.
The deliverables associated with the test execution phase are:
1. Defect Report
2. Report on Test case execution.
Test Cycle Closure - Phase in Software Testing Life Cycle
This is just the phase where the evaluation of the whole cycle takes place. The members of the testing team evaluate the criteria of the cycle completion in the basis of Quality, Test coverage, Time, Software, Cost, and crucial business objectives.
The team also discusses all the things which went well and the areas which need some improvement in the Software testing life cycle process. The bug and test case report will be used to analyze and find out the distribution of defects by severity and type. After the completion of the test cycle, the test metrics and test closure reports will be prepared.
The Entry criteria for the test cycle closure is:
- Test case execution report.
- Defect report.
- Test case execution should be completed.
The activities involved in Test cycle closure are:
1. Preparation of the test closure report.
2. Sharing the best practices for similar kind of project in the future.
3. Evaluating cycle completion.
The deliverables associated with the test cycle closure are:
1. Test metrics
2. Test closure reports
This completes all the phases of Software Testing Life Cycle.
Best Practices In The Software Testing Life Cycle
As we have discussed above there are many challenges in the Software Testing Life Cycle, but they can be overcome using the best practices that are available. Best practices in Software testing includes maintaining the test effort well-organized test efforts with well-defined systems and processes in place.
To avoid challenges in the implementation of the testing process, the organization adopt the following popular practices:
1. The testing activities are started early in the Software Testing Life Cycle: This is kind of an unspoken rule. By testing early, the bugs are also detected early and can be removed in the early stages as well thus reducing the cost.
2. Performing iterative tests: The software testing should be performed in iterations. It reduces the number of problems as we progress into the life cycle.
3. Reusing the test assets and improving the time spent with every subsequent cycle: Recycling and reusing of the test automation objects and test procedures enhance the efficiency and quality of the product. A lot of effort and time is can also be saved using this strategy.
4. Utilizing the testing and its strategies on the basis of requirements: Different types of requirements will need different testing so if we employ only those tests which is required and rest of the test which are redundant are removed, then a lot of resources and time can be saved, and the testing process will be more efficient.
STLC vs. SDLC
The Software Testing Life Cycle (STLC) is a part of the Software Development Life Cycle (SDLC). We can also say that STLC is a subset of SDLC. The Software Testing Life Cycle is limited to test for ensuring the quality of the product or the software while SDLC has a very vast and key role in the complete development of a product or software.
Software Testing Life Cycle is a very important phase in the Software Development Life Cycle process and the final software. The product cannot be commercialized or released without undergoing the SDLC phase. STLC is a part of the update or post-release cycle which is SDLC’s maintenance phase where known bugs or defects get fixed or sometimes a new functionality is also added to the product or the software.
Bug Life Cycle
The bug life cycle is also known as the Defect life cycle. It describes all the set of states in which a bug or a defect goes through from the discovery to the defect fixation. The number of states that a bug goes through depends from project to project.
In short first, the bug is detected and then a value is assigned to it, and then it is sent to the project manager for analysis. The project manager decides the status of the bug and that bug is processed according to the status assigned by the project manager. The following image will show the complete Bug life cycle.
Software Testing Life Cycle - Summary
In this article, we learned that software testing is necessary as it ensures the reliability of the product and the organizations. The software testing process in which the tests are expected in a well-planned and sequential order is called the Software Testing Life Cycle (STLC).
The Software Testing Life Cycle process can adopt 4 different methodologies or models namely the agile model, the waterfall model, the V model, and the spiral model. There are certain advantages and disadvantages to each of these methodologies.
The waterfall model is the earliest method introduced for software testing. Both the V model and the waterfall model works like a waterfall in a downward direction. The phases involved in both of these do not interrupt with each other and the next phase starts after the completion of the previous phase.
While in the agile model prolonged iterations of testing and developments take place across the whole Software Testing Life Cycle. While the spiral model is used for larger projects which involve higher risk management. In the Spiral model, a particular activity is done in one single iteration called a spiral.
The Software Testing Life Cycle contains 6 different phases, Requirement Analysis, Test Planning, Test Case development, Test environment setup, Test Execution, Test Cycle closure.
Each phase contains its own entry criteria, activities, and deliverables. In the requirement analysis phase, the requirement of the customer is specified by the customer. In the test planning phase, a plan is prepared for testing the software and executing the test cases. In the test case development phase, the test cases are created and then in the test environment phase, the environment is created in which the software will be tested.
In the test execution phase, the test cases are executed according to the plan prepared in the test planning phase, and the software is tested in the test environment. At last, in the test cycle closure, all the members of the testing team discuss the positives and negatives of the whole process and write the factors which need to be improved.
Later we discussed the best practices in STLC and we also discussed the differences between SDLC and STLC briefly.
And in the end, we saw the bug life cycle which involves all the states through which the bug goes through after being detected.