Software testing is important enough to have its own phase in the software development life cycle (SDLC). The software testing life cycle (STLC) is a step-by-step process that improves the quality of software by applying rigorous planning and analysis to the testing process.
Testing is a development tool that adds value to your team’s applications. Embracing testing as a vital component of software development can save you and your team a lot of time debugging and fixing errors in the future. In this post, I will lead you through the stages of the software testing life cycle by describing each step and how it can help you and your team to properly test software throughout the development lifecycle.
To follow along with the concepts in this post, a few assumptions have been made:
- You are a developer, tester, product manager, or otherwise involved in any of the phases in the software development life cycle
- You are interested in deploying reliable applications
- You believe that good user experience is a criteria for success of software applications
Our tutorials are platform-agnostic, but use CircleCI as an example. If you don’t have a CircleCI account, sign up for a free one here.
Using a sample application as a testing case study
- Open log-in page
- Enter email and password
- Click a button to log in
If the credentials are correct, the user is presented with their profile. If they are not correct, the user is presented with an error message.
Understanding the stages of the software testing life cycle
Now that we have selected the functionality we want to test, we can start appying the STLC to our application. There are six stages in the software testing life cycle:
- Requirement analysis
- Planning the tests
- Developing test cases
- Setting up the test environment
- Test execution
- Test closure
Below, I will describe how to go about testing our log-in flow by following these six steps.
Software testing life cycle stage 1 - requirement analysis
At this stage, the quality assurance team meets with all stakeholders to get a full understanding of the application requirements. Comprehensive knowledge of how the application should behave allows you to judge the scope of the testing process. Requirements can be either functional or non-functional. Spend some time prioritizing features and functionality to refine the focus of the testing, and avoid wasting time on what is less important to stakeholders, including users.
Also at this stage, determine what type of testing environment you will use and whether the tests can be automated.
For our log-in flow, analyzing the application requirements will determine:
- The URL to visit to log in to the application
- What information appears on the log-in form
- The credentials required to log in to the app
- The types of users who are expected to log in
- Whether logging in is available to everyone with an internet connection or restricted to a geographical region
- The type of codebase the application is built in
- The testing environment an app with our codebase requires
- Whether any log-in credentials are optional
- The error and success messages to show the users
- Whether or not tests can be automated
There are many more possibilities, even for our limited sample use case.
Software testing life cycle stage 2 - planning the tests
When the requirements analysis stage is complete, it is time to move on to planning your tests. In this stage, the testing team manager estimates the cost and effort that will go into the testing process. The estimate encompasses the resources required, the tools needed, and the testing environment. Limitations of the tests or resources are also determined.
Also part of the test planning stage is creating a testing schedule for the activities and people involved. The goal of the planning stage is to have a working document that includes the testing strategy, a detailed plan, and a schedule.
Planning for the log-in functionality in our sample application could include activities like these:
- Determine the number of developers and testers required to carry out the test
- Amount of time needed to set up and run the tests
- Tools for the testing environment; Jest and Puppeteer are just two examples
- System requirements for the tests, including limitations on older versions of software that the application does not support
- A list of test cases based on the requirements analyzed in the previous testing stage
There are many more activities and considerations that could be part of a testing plan.
Software testing life cycle stage 3 - developing test cases
When your test plan and schedule are in place, it is time for the team to start developing detailed test cases. Developing a test case includes identifying the specific test data that it requires.
Test case development activities for our sample app could include:
- Defining a successful log-in case, including the criteria and user credentials for it
- Designing the failed log-in flow when no credentials are provided
- Designing a failed log-in case when a user enters incomplete credentials, and determining what those credentials would be
- Designing a failed log-in case when the user enters incorrect credentials, and determining what the credentials would be
- Creating test cases and automation scripts
Of course, this is just a sample of the kinds of activities you could be completing in this phase of the testing life cycle.
Software testing life cycle stage 4 - setting up the test environment
So far, each stage of the testing life cycle has depended on the previous one. Luckily, this stage is one that can be completed at the same time as the test case development stage. After the testing environment requirements are determined and designed in the planning stage, you can start setting up the test environment.
The testing environment should simulate the conditions in which the software will run in production as closely as possible. Either a developer or tester can set up the testing environment; the testing team is not required here.
Some of the activities for setting up the testing environment are:
- Setting up an operating system environment with the minimum requirements for use in production
- Setting up the testing framework; for example Jest or Mocha
- Setting up the test runner; something like Karma or Jest
- Setting up an assertion library like Chai.js
- Creating test data, mocked libraries, and assets
- Installing supported browsers for browser testing
And, you guessed it, more.
Software testing life cycle stage 5 - test execution
With the test cases developed and the testing environment set up, testers can start executing test scripts. As the tests cases are executed, results are compiled and bugs are reported back to the testing team for documentation and test-case refinement.
Sometimes retesting is required. For example, the testing team might find some flaw in the design of one or more of the test cases, or someone could identify a need for additional test cases.
Software testing life cycle stage 6 - test closure
After executing tests, retesting if needed, identifying bugs, and documenting test results, it is time to wrap up the testing life cycle. In this stage, compile results into structured into reports for evaluation by stakeholders. Make sure the testing team meets to analyze test results and artifacts. Spend some time identifying improvements that can be made to the testing strategy. Use criteria like time, cost, test coverage, and alignment with business expectations to measure the success of this testing cycle.
The output of this stage is a detailed test closure report that includes meaningful, easy to understand test metrics. Use these metrics to determine the level of success achieved in this test cycle.
A thorough and professional software testing life cycle is the best way to create a culture of quality for your team and build confidence in an application for your stakeholders. The careful exploration of errors to remove defects gives your team increased insight into how your application works, which can save time when developing the next version. It is impractical to find all errors in a program, so exhaustive, extensive testing is not the best goal. The aim of every tester and developer should be to find and fix the errors with most negative impact on the use and performance of the application.
Fikayo Adepoju is a LinkedIn Learning (Lynda.com) Author, Full-stack developer, technical writer and tech content creator proficient in Web and Mobile technologies and DevOps with over 10 years experience developing scalable distributed applications. With over 40 articles written for CircleCI, Twilio, Auth0 and The New Stack blogs and also on his personal Medium page, he loves to share his knowledge to as many developers as would benefit from it. You can also check out his video courses on Udemy .