STLC - Test Case Development

Learn via video courses
Topics Covered

Overview

STLC stands for Software Testing Life Cycle, which is a practice followed by software testers to ensure that the application is bug-free before release to its end users.

Generally, the STLC process includes the following:

1) Requirements Analysis:

This is the first stage, where software testers analyze the requirements of the software product to ensure it is clear and feasible.

2) Test Planning:

In this stage, testers create a test plan which includes the scope of testing, time and resources used, testing approach, and environment setup.

3) Test case development: Testers develop test cases that cover all the aspects of functional and non-functional applications.

4) Test environment setup: In this stage, testers set up a test environment that includes both software and hardware configurations.

5) Test execution:

In test execution, testers execute their test cases and try to find as many defects as they can before the deployment.

6) Test reporting:

Testers prepare a test report which includes a detailed report of test execution, the number of defects found, and the recommendations for resolving those bugs.

7) Test closure:

This is the last stage, where the tester performs a final review of the test product and ensures that all the bugs have been resolved.

In the above, you just saw the whole process of STLC, but we will discuss in detail how test case development plays a major role in this process.

Introduction

STLC is a systematic approach to software testing that includes various stages from test planning to test closure. Test case development is also one of the crucial stages where test cases are created by the testing team to validate the software's performance and functionality.

In this article, we will discuss what are the various types of test cases, the activities involved in the test case development phase, the difference between test case and test scenario, etc.

In the next section, we will discuss the activities in the test case development phase.

Activities in the Test Case Development

In STLC test case development, various activities are critical in writing test cases. The following are the activities performed in test case development:

1) Understanding the Requirements: The testing team needs to understand the requirements specified in the SRS document and based on that, they prepare possible test scenarios and use cases.

2) Test Case Design: After gathering all the requirements, the testing team designs the test case that covers all the possible use cases. It mainly covers the functionality, performance, and usability aspects of the software product.

3)Test Case Preparation: After designing test cases, the testing team prepares the test documents which cover test case ID, description, preconditions, test steps, and expected and actual results.

4)Review and Approval: The test documents should be then reviewed by the stakeholders, project managers, developers' team, and the testing team.

5)Test Case Execution: Once test cases are reviewed, the testing team needs to execute the test cases. They report the bugs or defects found during testing.

6)Test Case Maintenance: The testing team maintains the test cases regularly making sure that all the test cases are up-to-date.

Activity Block Diagram

Activity Block Diagram

Write and Review Test Cases

Writing effective test cases is very important from a testing point of view. It helps to identify defects in the early development cycle which reduces the cost and improves the quality of the software. Here are some key points on how to write effective test cases:

  • Understand the requirements
  • Define clear test objectives and success criteria
  • Write test cases in a structured and organized manner
  • Cover all possible scenarios and edge cases

Above we saw how to write effective test cases as per STLC test case development aspects but it should be reviewed by the stakeholders and other teams to get approval.

Reviewing the test cases is very challenging and requires specific skill sets and experience. Here are some best practices that one should follow while reviewing the test cases:

  • Understand the purpose and requirements of the test cases
  • Ensure that the test cases are structured and organized
  • Verify the completeness and accuracy of the test cases
  • Collaborate with the test case author

Test Case Templates

Here is the sample test case template that can be used in STLC test case development:

1) Test Case ID: It should be unique for each test case.

2) Test Case Description: The brief description of the test case.

3) Test Case Objective: The objective of the test case.

4) Pre-requisites: Any prerequisites that need to be performed before executing the test cases.

5) Test Data: Any specific data required to execute the test case.

6) Steps to Execute: A similar format must be present for the steps required to execute.

  • Step 1
  • Step 2
  • Step 3
  • Step 4.

7) Expected Result: The expected result of the test case.

8) Actual Result: The actual result of the test case after execution.

9) Pass/Fail: The Pass/Fail status of the test case.

10) Defect ID: If any defects were identified during the execution of the test case, include the Defect ID here.

11) Comments: Any additional comments or notes about the test case execution?

Types of test cases

There are several types of test cases designed to ensure the testing of the software. Here are some of the types of test cases used in` STLC test case development:

  • Functional Test Cases
  • Integration Test Cases
  • Performance Test Cases
  • Security Test Cases
  • Regression Test Cases
  • Usability Test Cases

Each type of test case has its purpose in STLC test case development and the combination of these test cases ensures the testing of the application.

Difference Between Test Cases and Test Scenarios

In software testing, these two terms are very widely used. Let's understand the basic difference between a test case and a test scenario.

Test caseTest scenario
1) A test case is a set of instructions that describe how to execute a test scenario.1) A test scenario is the high-level description of the feature that is being tested
2) Test cases ensure that the testing is performed systematically and thoroughly.2) Test scenarios help in defining the scope and purpose of testing.

Conclusion

In conclusion, the process of test case development should start at the early STLC stage and continue throughout the entire software development process.

  • Test cases should be designed in such a way that covers all possible scenarios.
  • They should be easy to understand and should provide clear steps to reproduce any issues that are discovered during testing.
  • By following a well-defined test case development process, `software development teams can ensure that they deliver high-quality software that meets the needs of their users.