Unit-4(Software Testing)
Unit-4(Software Testing)
Software Testing:
Software testing is a systematic process of evaluating software
applications to ensure that they meet the specified requirements and
perform as expected. It involves executing software components or
systems with the intent of finding defects or errors. The goal of software
testing is to identify and rectify issues before the software is deployed to
end-users.
Testing Principles:
1. Exhaustive Testing is not possible: It is practically impossible to test
every possible input and scenario for a software application.
2. Defect Clustering: A small number of modules or functionalities
usually contain most of the defects.
3. Pesticide Paradox: If the same set of tests is repeated over time, it
becomes less effective in finding new defects.
4. Testing is Context-Dependent: Testing techniques and approaches
should be adapted based on the context of the project and the software
being tested.
5. Absence-of-Errors Fallacy: The absence of errors does not guarantee
the absence of defects.
Defect Management:
Defect management involves the process of identifying, documenting,
tracking, and resolving defects found during the testing process. It
includes activities such as defect reporting, classification, prioritization,
assignment, tracking, and verification of defect fixes.
Traceability Matrix:
A traceability matrix is a document that establishes a relationship
between requirements, test cases, and other relevant artifacts in a
software project. It helps ensure that all requirements are covered by
appropriate test cases and allows for easy tracking of the progress of
testing activities. The matrix typically consists of a table format, where
requirements are listed in rows and test cases are listed in columns.
Each cell in the matrix indicates the relationship between a specific
requirement and a specific test case, indicating whether the test case
covers the requirement or not.
Test Planning:
Test planning is the process of defining the approach, objectives, scope,
and resources required for testing a software application. It involves the
following activities:
1. Defining Objectives: Clearly state the goals and objectives of the
testing effort, such as ensuring software functionality, reliability,
performance, or security.
2. Determining Scope: Identify the features, modules, or functionalities to
be tested, as well as any areas that are out of scope.
3. Creating a Schedule: Define the timeline and milestones for the
testing activities, considering project deadlines and dependencies.
4. Selecting Approaches: Determine the testing approaches and
techniques to be used, such as black-box testing, white-box testing, or a
combination of both.
5. Assigning Roles and Responsibilities: Identify the roles and
responsibilities of the testing team members, including testers, test
leads, and stakeholders.
6. Making Assumptions: Document any assumptions made during the
test planning process, such as the availability of test environments or
test data.
7. Identifying Risks and Mitigations: Assess potential risks associated
with the testing process and develop mitigation strategies to address
them.
8. Defining Entry and Exit Criteria: Specify the conditions that must be
met before testing can begin (entry criteria) and the conditions for
completing the testing phase (exit criteria).
Objective of Testing:
The objective of testing is to ensure that the software meets the
specified requirements, functions as intended, and performs reliably. The
specific objectives may vary depending on the project and its
stakeholders. Common objectives include identifying defects or bugs,
validating functionality, verifying system performance, ensuring security,
and enhancing the overall quality of the software.
Scope of Testing:
The scope of testing defines the boundaries and extent of the testing
effort. It includes identifying the features, modules, or functionalities that
will be tested, as well as any specific areas or scenarios that will not be
tested. The scope may also consider different types of testing, such as
functional testing, integration testing, performance testing, or user
acceptance testing.
Schedule:
The testing schedule defines the timeline for executing the testing
activities. It considers project deadlines, dependencies on other
activities, and resource availability. The schedule should be realistic and
account for iterations, test cycles, and any retesting required for defect
fixes or changes in requirements.
Approaches:
Testing approaches refer to the strategies and techniques used to
conduct the testing activities. They can vary depending on factors such
as the project's complexity, the available resources, and the desired
level of testing coverage. Common testing approaches include black-box
testing, white-box testing, gray-box testing, risk-based testing, and
exploratory testing.
Assumptions:
Assumptions in testing are the conditions or factors that are considered
to be true, without which the testing process may be affected.
Assumptions could include factors like the availability of test
environments, test data, or access to necessary resources during the
testing phase. Documenting assumptions helps identify potential risks
and plan accordingly.
Test Automation:
Test automation involves the use of tools, scripts, and frameworks to
automate the execution of test cases. It helps improve the efficiency and
effectiveness of the testing process, reduces human error, and allows
repetitive tests to be executed more quickly.
Deliverables:
The deliverables in the testing process include:
- Test Plan: A document that outlines the testing approach, objectives,
scope, schedule, and resources.
- Test Cases: Documents that describe the specific steps and expected
results for executing a test.
- Test Scripts: Automated scripts used for executing test cases.
- Defect Reports: Documents that log and track defects found during
testing.
- Test Closure Reports: Summaries of the testing activities, results, and
lessons learned.
Test Metrics:
Test metrics are measurements used to evaluate the effectiveness,
efficiency, and progress of the testing process. Examples of test metrics
include:
- Test Coverage: The percentage of requirements or code covered by
executed tests.
- Defect Density: The number of defects found per unit of size (e.g.,
defects per line of code).
- Test Execution Effort: The amount of effort expended in executing tests.
- Defect Turnaround Time: The time taken from defect reporting to defect
resolution.