Chapter 04
Software testing life cycle (STLC)
Last updated
Software testing life cycle (STLC)
Last updated
The general software testing process is a set of steps that are followed to ensure that software is tested thoroughly and that any defects are identified and resolved before the software is released to customers.
The Software Testing Life Cycle (STLC) is a process used to ensure that software is tested thoroughly and that any defects are identified and resolved before the software is released to customers. The goal of STLC is to improve the quality of the software and to reduce the number of defects that are found after the software has been released.
STLC follows a sequential process, which includes a series of steps that are performed in a specific order. These steps include requirement analysis, test planning, test case design and development, test environment setup, test execution, and test cycle closure. Each step in the process serves a specific purpose and contributes to the overall goal of ensuring that the software is of high quality.
The use of STLC helps to ensure that the software meets the requirements of the customer, that the software is tested thoroughly, that any defects are identified and resolved, and that the software is of high quality. Additionally, it helps to improve the communication and coordination between the different teams involved in the software development process. STLC is a best practice in software development industry as it helps in identifying the defects early and fixing them as soon as possible which in turn save the development cost and time.
Requirement Analysis: This phase involves understanding the requirements of the software to be tested. This includes reviewing the requirements document, clarifying any ambiguities, and identifying any gaps in the requirements.
Test Planning: In this phase, a plan is created for testing the software. This includes identifying the scope of testing, the resources required, the schedule for testing, and the risks that need to be mitigated.
Test Case Design and Development: In this phase, test cases are designed and developed. Test cases are sets of inputs, expected results, and steps to be followed to test the software.
Test Environment Setup: In this phase, the test environment is set up. This includes installing the software, configuring the test environment, and preparing the test data.
Test Execution: In this phase, the test cases are executed and the software is tested. Any defects or issues found during testing are documented.
Test Cycle Closure: In this phase, the test cycle is closed. This includes reporting the test results, analyzing the defects found, and making any necessary changes to the software.
Overall, the goal of STLC is to ensure that software is tested thoroughly and that any defects are identified and resolved before the software is released to customers.
There are several different test case design techniques that can be used to create effective test cases for software testing. The three main types of test case design techniques are:
Specification-based Techniques: These techniques are used to test the software based on its specifications, such as its requirements or design documents. This type of technique includes black box testing, white box testing and grey box testing.
Structure-based Techniques: These techniques are used to test the software based on its structure, such as its code or architecture. This type of technique includes boundary value analysis, equivalence partitioning, and statement coverage.
Experience-based Techniques: These techniques are used to test the software based on the experience and knowledge of the testers. This type of technique includes error guessing, exploratory testing and ad-hoc testing.
Specification-based techniques are used to test the functional and non-functional requirements of the software, structure-based techniques are used to test the internal structure of the software and experience-based techniques are used to test the software based on the experience of the testers.
Each of these techniques has its own advantages and disadvantages and can be used in different situations, depending on the specific requirements of the software being tested.
Specification-based Techniques
Specification-based techniques are used to test the software based on its specifications, such as its requirements or design documents. These techniques are also known as black box testing techniques, as they test the functionality of the software without considering its internal structure.
The five main categories of specification-based techniques are:
Boundary Value Analysis (BVA): This technique tests the software by focusing on the input values at the edges of the input domain. It is based on the observation that errors often occur at the boundaries of the input domain.
Equivalence Partitioning (EP): This technique divides the input domain into partitions, or classes, of input values. Each partition is tested to ensure that the software behaves correctly for all input values within that partition.
Decision Table Testing: This technique is used to test the software by focusing on the logical relationships between input and output values. It is based on a table that shows all possible combinations of inputs and the corresponding outputs.
State Transition Diagrams: This technique is used to test the software by focusing on the different states the software can be in and the transitions between those states. It is based on a diagram that shows all the possible states and transitions.
Use Case Testing: This technique is used to test the software by focusing on the different scenarios, or use cases, in which the software will be used. It is based on the use cases and the interactions between the user and the software.
Each of these techniques has its own advantages and disadvantages and can be used in different situations, depending on the specific requirements of the software being tested. These techniques can be used individually or in combination with one another to provide a comprehensive testing approach.
Structure-based Techniques
Structure-based techniques are used to test the software based on its internal structure, such as its code or architecture. These techniques are also known as white box testing techniques, as they test the internal structure of the software. The four main categories of structure-based techniques are:
Condition Coverage Testing: This technique tests the software by ensuring that each condition in a decision statement (e.g. if-else statements) has been executed at least once and has been executed with all possible outcomes (True/False).
Decision Coverage Testing: This technique tests the software by ensuring that each decision has been executed at least once and has been executed with all possible outcomes (True/False).
Statement Coverage Testing: This technique tests the software by ensuring that each line of code has been executed at least once.
Multiple Condition Testing: This technique tests the software by ensuring that all combinations of conditions in a decision statement have been tested. It is also known as "All-Uses Testing" or "Multiple Condition/Decision Testing".
Each of these techniques has its own advantages and disadvantages and can be used in different situations, depending on the specific requirements of the software being tested. Condition Coverage and Decision Coverage are the subset of Statement coverage, which means if we perform condition and decision coverage testing then we are also performing statement coverage testing.
Experience-based Techniques
Experience-based techniques are used to test the software based on the experience and knowledge of the testers. These techniques are also known as ad-hoc testing techniques, as they are not based on formalized methods or procedures. The main categories of experience-based techniques are:
Error Guessing: This technique tests the software by using the knowledge and experience of the testers to guess where errors might occur and to test those areas specifically.
Exploratory Testing: This technique tests the software by exploring it, trying out different inputs and observing the results. The goal is to find defects by using the tester's intuition and creativity.
Ad-hoc testing: This technique tests the software in an informal and unstructured way. It is a method of testing where the tester has complete freedom to test the software in any way they choose.
Experience-based techniques are less formalized than specification-based and structure-based techniques, but they can be very effective in finding defects that might be missed by other techniques. Error guessing and exploratory testing are often used to supplement formalized testing techniques, and it can be useful to perform ad-hoc testing as a way of validating that the software has been thoroughly tested.