UNIT - I Notes
UNIT - I Notes
1.1 INTRODUCTION
Software testing is a method for figuring out if the real piece of
software meets requirements and is error-free. It involves running software
or system components manually or automatically in order to evaluate one
or more intriguing characteristics. Finding faults; gaps or unfulfilled
requirements in comparison to the documented specifications is-the aim of
software testing.
Some prefer to use the terms white box and black box testing to
describe the concept of software testing. To-put it simply, software
testing is the process of validating an application that is being tested.
1. Equivalence partitioning
Testing professionals may organize potential inputs into "partitions"
and test just one sample input from each category. For instance, it is
sufficient for testers to verify one birth date in the "under 18" group and one
date in the "over 18" group if a system asks for a user's birth date and
returns the same answer for users under the age of 18 and a different
response for users over 18.
Phases of STLC
2. Test Planning: Test Planning is the most efficient phase of the software
testing life cycle where all testing plans are defined. In this phase manager
of the testing, team calculates the estimated effort and cost for the testing
work. This phase gets started once the requirement- gathering phase is
completed.
The activities that take place during the Test Planning stage include:
• Identifying the testing objectives and scope
Developing a test strategy: selecting the testing methods and
techniques that will be used.
At the end of this stage, the testing team should have a detailed plan
for the testing activities that will be performed, and a clear
understanding of the testing objectives, scope, and deliverables. This
will help to ensure that the testing process is well-organized and that
the testing team is able to deliver high-quality results.
3. Test Case Development: The test case development phase gets started
once the test planning phase is completed. In this phase testing team notes
down the detailed test cases. The testing team also prepares the required
test data for the testing. When the test cases are prepared then they are
reviewed by the quality assurance team.
The activities that take place during the Test Case Development stage
include:
• Identifying the test cases that will be developed
• Writing test cases that are clear, concise, and easy to understand
• Creating test data and test scenarios that will be used in the test
cases
• Identifying the expected results for each test case
• Reviewing and validating the test cases
• Updating the requirement traceability matrix (RTM) to map
requirements to test cases
At the end of this stage, the testing team should have a set of
comprehensive and accurate test cases that provide adequate coverage of the
software or application. This will help to ensure that the testing process is
thorough and that any potential issues are identified and addressed before
the software is released.
5. Test Execution: After the test case development and test environment
setup test execution phase gets started. In this phase testing team starts
executing test cases based on prepared test cases in the earlier step.
The activities that take place during the test execution stage of the
Software Testing Life Cycle (STLC) include:
• Test execution: The test cases and scripts created in the test
design stage are run against the software application to identify any
defects or issues.
• Defect logging: Any defects or issues that are found during test
execution are logged in a defect tracking system, along with
details such as the severity, priority, and description of the issue.
• Test data preparation: Test data is prepared and loaded into the
system for test execution
• Test environment setup: The necessary hardware, software,
and network configurations are set up for test execution
• Test execution: The test cases and scripts are run, and the results
are collected and analyzed.
• Test result analysis: The results of the test execution are analyzed
to determine the software’s performance and identify any defects or issues.
• Defect retesting: Any defects that are identified during test
execution are retested to ensure that they have been fixed correctly.
• Test Reporting: Test results are documented and reported to
the relevant stakeholders.
It is important to note that test execution is an iterative process and
Panimalar Engineering College 12
UNIT I 21IT1904 - SOFTWARE TESTING AND AUTOMATION
may need to be repeated multiple times until all identified defects are fixed
and the software is deemed fit for release.
6. Test Closure: Test closure is the final stage of the Software Testing Life
Cycle (STLC) where all testing-related activities are completed and
documented. The main objective of the test closure stage is to ensure
that all testing-related activities have been completed and that the
software is ready for release.
At the end of the test closure stage, the testing team should have a
clear understanding of the software’s quality and reliability, and any defects
or issues that were identified during testing should have been resolved. The
test closure stage also includes documenting the testing process and any
lessons learned so that they can be used to improve future testing processes
Test closure is the final stage of the Software Testing Life Cycle (STLC)
where all testing-related activities are completed and documented. The main
activities that take place during the test closure stage include:
• Test summary report: A report is created that summarizes the
overall testing process, including the number of test cases executed, the
number of defects found, and the overall pass/fail rate.
• Defect tracking: All defects that were identified during testing are
tracked and managed until they are resolved.
• Test environment clean-up: The test environment is cleaned up,
and all test data and test artifacts are archived.
• Test closure report: A report is created that documents all the
testing-related activities that took place, including the testing objectives,
scope, schedule, and resources used.
• Knowledge transfer: Knowledge about the software and testing
process is shared with the rest of the team and any stakeholders who may
need to maintain or support the software in the future.
• Feedback and improvements: Feedback from the testing process is
collected and used to improve future testing processes
1. Easy to Understand.
2. Testing Methods like planning, test designing happens well before coding.
3. This saves a lot of time. Hence a higher chance of success over the
waterfall model.
4. Avoids the downward flow of the defects.
5. Works well for small plans where requirements are easily understood.
The fragment terminates gently if the initial condition is not met and
aborts with an error if the initial condition was met but the final condition is
is not. This way of specifying tests turns out to be a foundation for deriving
test cases according to Version 1. Reasoning about contracts we can
systematically develop test cases.
Program Correctness
Following the preceding discussion we base our notion of correctness
on contracts.
We consider two variants in which contracts can be specified:
• Pairs of assume-assert-statements in program fragments and tests.
These contracts are executable and can be evaluated at run-time.
• Pairs of requires-ensures-clauses used for specifying functions.
These contracts are not executable. They are exclusively used for proving
that functions satisfy their contracts. By contrast, assume and assert can
be used for proving properties and for their runtime checking. Properties
specified using requires and ensures are more expressive, permitting
statements over infinite value ranges, for instance, which cannot be
evaluated at run-time. We introduce function contracts in the next chapter.
We call the first component of a contract, its assume-statement or
requires-clause, a pre-condition. We call its second component, its assert-
statement or ensures-clause, a post- condition.
We say a program (or function) is correct if it satisfies its contract:
Starting in a state
satisfying the pre-condition, it terminates in a state satisfying its post-
condition.
Program Verification
To demonstrate that a program is correct we verify it. We consider two
principles methods for verifying programs.
Proof
Using logical deduction we show that any execution of a program
starting in a state satisfying the pre-condition, it terminates in a state
satisfying its post-condition. In other words, we show that the program is
correct.
Testing
Executing a program for specific states satisfying the pre-
condition, we check whether on termination a state is reached that
satisfies the post-condition. It is up to us to determine suitable pairs of
states, called test cases. This approach does not show that a program is
correct. In practice, we conjecture that programs that have been
subjected to a sufficient number of tests is correct. This is kind of
reasoning is called induction: from a collection of tests that confirm
correctness for precisely those tests, we infer that this is the case for
possible tests. Testing is a fallible verification method: it is entirely
possible that all tests that we have provided appear to confirm
correctness, but later we find a test case that refutes the conjecture.
Either the program contains an error or the test case is wrong.
Panimalar Engineering College 17
UNIT I 21IT1904 - SOFTWARE TESTING AND AUTOMATION
1. Reliability Allocation
• Test schedule
• Test resource allocation
• Time to market
• Maintenance resource allocation
Safety-critical software
Safety-critical software is very different from both non-critical
software and safety- critical hardware. The difference lies in the massive
testing program that such software undergoes.
1. The Goal of testing is to find defects before customers find them out.
Whatever a software organization develops should meet the needs of
the customer. Everything else is secondary. Testing is a means of
makings sure that the product meets the needs of the customer.
Customer doesn’t mean an External Customers. There are also
Internal Customers .For examples if a product is built using different
components from different groups within an organization, the users of
these different components should be considered customers, even if
they are from the same organizations.
Internal Customers concept a step further where the development
team considers the testing team as its internal customer .this way we
can ensure that the product is built not only for usage requirement
but also for testing requirements.
Testing can only prove the presence of defects never the absence.
It might often appear quite difficult to test all the modules and their
features throughout the real testing process using effective and ineffective
combinations of the input data.
3. A Test in time
Defect in a product can come from any phase. There could have been
5. Defect clustering
Testing can only find a part of defects that exist in a cluster; fixing a
defect may introduce another defect to the cluster.
Defects are like pests, testing is like designing the right pesticides to catch and kill the
pests, and the test cases that are written are like pesticides .
Tests are like pesticides- you have to constantly revise their composition to tackle new
pests(Defects) .
This is based on the theory that when you use pesticide repeatedly on
crops, insects will eventually build up an immunity, rendering it ineffective.
Similarly, with testing, if the same tests are run continuously then – while
they might confirm the software is working – eventually they will fail to find
new issues. It is important to keep reviewing your tests and modifying or
adding to your scenarios to help prevent the pesticide paradox from
occurring – maybe using varying methods of testing techniques, methods
and approaches in parallel.
1. Planning
The planning phase starts with the selection of a group review team. A
moderator plans the activities performed during the inspection and verifies
that the software entry criteria are met.
2. Overview
The overview phase intends to disseminate information regarding the
background of the product under review. Here, a presentation is given to the
inspector with some background information needed to review the software
product properly.
3. Preparation
In the individual preparation phase, the inspector collects all the
materials needed for inspection. Each reviewer studies the project
individually and notes the issues they encounter.
4. Meeting
The moderator conducts the meeting to collect and review defects.
Here, the reader reads through the product line by line while the inspector
points out the flaws. All issues are raised, and suggestions may be recorded.
5. Rework
Based on meeting notes, the author changes the work product.
6. Follow-up
In the last phase, the moderator verifies if necessary changes are
made to the software product, compiling a defect summary report.
System Test
System as
a Whole
Acceptance
Test
Top-Down Integration :-
Integration Testing involves testing the topmost component
interface with other components in same order as you navigate from top to
bottom, till we cover all the components.
To understand this methodology, we will assume that a new product/
software development where components become available one after another
in the order of component number specified .The integration starts with
testing the interface between Component 1 and Component 2 .To complete the
integration testing all interfaces mentioned covering all the arrows, have to be
tested together. The order in which the interfaces are to be tested is depicted
Panimalar Engineering College 28
UNIT I 21IT1904 - SOFTWARE TESTING AND AUTOMATION
in the table below. In a n incremental product development, where one or
two components gets added to the product in each increment, the integration
testing methodology pertains to only those new interfaces that are added .
Components 1
Bottom-Up Integration:-
Bottom-up integration is just the opposite of top-down integration, where the
components for a new product development become available in reverse order,
starting from the bottom. Testing takes place from the bottom of the control
flow upwards. Components or systems are substituted by drivers. Logic Flow
is from top to bottom and integration path is from bottom to top. Navigation in
bottom-up integration starts from component 1 converting all sub systems ,
till components 8 is reached. The order is listed below. The number of steps in
the bottom up can be optimized into four steps. By combining step2 and step3
and by combining step 5-8 in the previous table.
Component 8
Big bang Integration is deal for a product where the interfaces are
stable with less number of defects.
PART –B QUESTIONS
1. Enumerate and elucidate the fundamental software testing principles and their
significance in the testing process
2. What do you mean by V-Model of Software Testing, and show how it differs
from traditional development approaches, and its role in promoting early defect
detection.
3. Explain the relationship between software failures, errors, and faults (defects)
and how they impact the reliability of software systems.
4. Explain the three stages of testing—Unit Testing, Integration Testing, and
System Testing—and their respective objectives and challenges.
5. Explain the concepts of Black-Box Testing and White-Box Testing,
highlighting their differences and use cases.
6. List out the fundamental reasons for testing software, and how do they
contribute to the software development process?
7. Apply the concept and importance of Integration Testing in the context of the
inventory management and order processing application.
8. Examine in detail about program inspections and outline their purpose,
processes, and key participants in a software development context.
9. How would you decide whether to use Black-Box Testing or White-Box
Testing, and why for complex project as a quality analyst.
10. Assume that you are a software project manager leading a project where
quality is paramount. How would you utilize the V-Model to ensure early
defect detection and effective testing?