Skip to main content
Software Testing – Complete Beginner to Advanced Guide
CHAPTER 02 Intermediate

Software Testing Life Cycle (STLC)

Updated: May 16, 2026
20 min read

# CHAPTER 2

Software Testing Life Cycle (STLC)

1. Introduction

Software testing is not a random activity where someone clicks around an app hoping it breaks. It is a highly structured, systemic engineering process. This process is known as the Software Testing Life Cycle (STLC). The STLC defines the exact sequence of activities conducted by the QA team to ensure software quality goals are met. Just as developers follow a strict methodology to build code, testers follow the STLC to validate it. In this chapter, we will dissect the 6 core phases of the STLC, from analyzing the initial business requirements to the final test closure report.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Identify and explain the 6 phases of the Software Testing Life Cycle.
  • Understand the deliverables expected at the end of each phase.
  • Differentiate between Test Planning and Test Case Development.
  • Describe the process of Test Execution and Bug Reporting.
  • Evaluate criteria for Test Closure.

3. Phase 1: Requirement Analysis

Before you can test a system, you must know what the system is *supposed* to do.
  • Activity: The QA team studies the Business Requirement Document (BRD) and Acceptance Criteria. They identify if the requirements are actually testable.
  • Output: A Requirement Traceability Matrix (RTM) - a document linking every business requirement to a future test case, ensuring nothing is missed.

4. Phase 2: Test Planning

This is the strategic phase, usually led by a QA Lead or Test Manager.
  • Activity: The team determines the testing strategy. What tools will we use? (e.g., Selenium for UI, Postman for API). How much time do we have? Who is assigned to what? What is the budget?
  • Output: The Test Plan Document. It outlines the scope, objectives, schedule, and resource allocation.

5. Phase 3: Test Case Development

This is where the tactical work begins.
  • Activity: Testers write detailed, step-by-step instructions on how to test each requirement. They write "Positive" test cases (valid data) and "Negative" test cases (invalid data). They also create the necessary "Test Data" (e.g., dummy user accounts).
  • Output: Test Cases, Test Scripts (for automation), and Test Data.

6. Phase 4: Test Environment Setup

Tests cannot be run on a developer's local laptop, nor should they be run in the live Production database.
  • Activity: DevOps and QA collaborate to set up a dedicated "Staging" or "QA" server. This server mimics the production environment exactly, complete with databases and network configurations.
  • Output: A ready-to-use Test Environment and a Smoke Test (a quick check to ensure the environment isn't completely broken).

7. Phase 5: Test Execution and Bug Reporting

The developers have deployed the code to the QA environment. It is time to execute.
  • Activity: Testers execute the step-by-step test cases created in Phase 3. If the actual result matches the expected result, the test Passes. If it differs, the test Fails, and a Bug/Defect is logged in a tracking system (like Jira) and assigned back to the developer.
  • Output: Test Execution Results and Defect Reports.

8. Phase 6: Test Closure

The software has been tested, bugs have been fixed and verified, and the product is ready to launch.
  • Activity: The QA team meets to evaluate the testing cycle. They review metrics: How many bugs were found? How many slipped through? Did we meet our deadlines? What can we do better next time?
  • Output: Test Closure Report and Test Metrics.

9. Visual Learning: STLC Workflow

txt
1234567891011
[ 1. Requirement Analysis ] ---> Output: RTM
           |
[ 2. Test Planning ]      ---> Output: Test Plan Document
           |
[ 3. Test Case Dev ]      ---> Output: Test Cases & Scripts
           |
[ 4. Environment Setup ]  ---> Output: QA Staging Server
           |
[ 5. Test Execution ]     ---> Output: Bug Reports (Sent to Devs)
           |
[ 6. Test Closure ]       ---> Output: Final Quality Report

10. Best Practices

  • Parallel Execution: In modern Agile environments, Phase 1, 2, and 3 happen *while* the developers are writing the code. You do not wait for the code to be finished to start writing your test cases.

11. Common Mistakes

  • Skipping Requirement Analysis: Many junior testers jump straight into writing test cases without fully understanding the business logic. This leads to tests that pass technically, but fail to validate the actual business need.

12. Mini Project: Map the STLC for a Feature

Scenario: The business wants a "Reset Password via Email" feature. Your STLC Map:
  1. 1. Req Analysis: Read the rule: "Link expires in 15 mins."
  1. 2. Test Plan: Decide to test this manually using fake email accounts.
  1. 3. Test Case Dev: Write Case 1: Click link within 5 mins. Write Case 2: Click link after 16 mins.
  1. 4. Env Setup: Ensure the QA server can send outbound emails to Mailtrap.
  1. 5. Execution: Run the tests. (Uh oh, the link worked after 20 minutes! Log a Bug).
  1. 6. Closure: Bug fixed, verified, feature approved.

13. Practice Exercises

  1. 1. What is the purpose of the Requirement Traceability Matrix (RTM)?
  1. 2. Why is a dedicated "Test Environment" (Phase 4) necessary? Why shouldn't QA test directly on the live Production server?

14. MCQs with Answers

Question 1

During which STLC phase does the QA team identify which tools (e.g., Selenium, Postman) will be used and allocate resources and schedules?

Question 2

What is the primary output generated during Phase 5 (Test Execution)?

15. Interview Questions

  • Q: Explain the complete Software Testing Life Cycle (STLC). If a project is running out of time, which phase is the most dangerous to skip and why?
  • Q: What is the Entry Criteria and Exit Criteria for the "Test Execution" phase?
  • Q: Describe a scenario where a test case "Passes" but the requirement is still considered a failure. (Hint: Think about Phase 1).

16. FAQs

Q: How long does the STLC take? A: In traditional Waterfall projects, it could take months. In modern Agile (Scrum) projects, the entire STLC is compressed into a 2-week "Sprint," happening continuously.

17. Summary

In Chapter 2, we mapped the architectural blueprint of the QA process: the Software Testing Life Cycle (STLC). We learned that testing is not a chaotic, ad-hoc activity, but a rigorous 6-phase engineering workflow. By analyzing requirements, planning strategy, authoring precise test cases, setting up isolated environments, executing methodically, and closing with metric analysis, QA teams ensure maximum test coverage and guarantee the delivery of high-quality software.

18. Next Chapter Recommendation

Now that we know *how* the process works, we need to know *what* types of tests we are running. Proceed to Chapter 3: Types of Software Testing.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·