100% found this document useful (1 vote)
46 views27 pages

Software Testing Overview and Methods

Software testing is the process of executing a program to determine if it matches specifications and operates as intended. While testing can find bugs, it cannot prove their absence. There are too many possible paths through code, inputs, and environments to test everything. Bugs escape testing when untested code, inputs, or environments are encountered. Effective testing requires automation, occurs at all phases, and uses both black-box and white-box techniques.

Uploaded by

Frank Vijay
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
46 views27 pages

Software Testing Overview and Methods

Software testing is the process of executing a program to determine if it matches specifications and operates as intended. While testing can find bugs, it cannot prove their absence. There are too many possible paths through code, inputs, and environments to test everything. Bugs escape testing when untested code, inputs, or environments are encountered. Effective testing requires automation, occurs at all phases, and uses both black-box and white-box techniques.

Uploaded by

Frank Vijay
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
  • Software Testing
  • Overview
  • Definition of Software Testing
  • Why Test?
  • Cost of Delaying the Release of a Software Product
  • Beta Testing
  • Problems with Beta Testing
  • Cutting Testing Costs can Increase other Costs
  • Problems with Testing
  • Another Problem
  • Reasons that Bugs Escape Testing
  • Why Can’t Every Bug be Found?
  • How is Testing Done
  • Phases of the Software Process
  • Why No Testing Phase?
  • Nonexecution-Based Testing
  • Execution-Based Testing
  • Black-Box / White-Box Testing
  • Test Automation
  • Any Questions?

Software Testing

Overview
Definition of Software Testing
Problems with Testing
Benefits of Testing
Effective Methods for Testing
Definition of Software Testing
Software testing is the process of
executing a software system to determine
whether it matches its specification and
executes in its intended environment.
Program testing can be a very effective
way to show the presence of bugs, but it
is hopelessly inadequate for showing
their absence [Dijkstra, 1972]
Why Test?
Q: If all software is released to
customers with faults, why should we
spend so much time, effort, and money
on testing?
Cost of Delaying the Release
of a Software Product
Timing is another important factor to
consider.
New products: The first to the market
often sells better than superior products
that are released later.
Beta Testing
Customers test for free!
Seems to give you test cases
representative of customer use.
Helps to determine what is most
important to the customers.
Can do more configuration
(environment) testing than in your
testing lab.
Problems with Beta Testing
Most beta testers are techies who
have a higher tolerance of bugs. They
do not represent the average customer.
Beta testers usually wont report:
usability problems, bugs they dont
understand and bugs that seem
obvious.
Takes much more time and effort to
handle a user reported bug.
Cutting Testing Costs can
Increase other Costs
Customer support can be very
expensive. Less bugs = less calls.
Customers will look for more reliable
solutions.
Software organizations must perform
cost benefit analysis to determine how
much to spend on testing.
Problems with Testing
Since it is impossible to find every fault
in a software system, bugs will be found
by customers after the product is
released.
Another Problem
In many software companies, testers are ill-
equipped to test software. For example: My
last co-op firm (which will remain unnamed).

Testing done almost entirely by untrained co-


ops.
Testers were responsible for creating black-
box test plans without being given formal
specifications.
Testers were not provided with tools to
automate test plans.
Reasons that Bugs Escape
Testing
User executed untested code.
User executed statements in a different
order than was tested.
User entered an untested combination
of inputs.
Users operating environment was not
tested.
Why Cant Every Bug be
Found?
Too many possible paths.
Too many possible inputs.
Too many possible user environments.
Too Many Possible Paths
Too Many Possible Inputs
Programs take input in a variety of
ways: mouse, keyboard, and other
devices.
Must test Valid and Invalid inputs.
Most importantly, there are an infinite
amount of sequences of inputs to be
tested.
Too Many Possible User
Environments
Difficult to replicate the users combination of
hardware, peripherals, OS, and applications.
Impossible to replicate a thousand-node
network to test networking software.
How is Testing Done
Phases of the Software
Process

Requirements Specification
Design Phase
Phase Phase

Implementation
Phase

Retirement Maintenance Integration


Phase Phase Phase
Why No Testing Phase?
Testing must be done at every phase.
Testing of a phase must be build upon
and checked against the results of the
previous phase.
Non-execution based testing is done in
early phases (before executable code is
produced).
Execution and non-execution based
testing can be done in later phases.
Nonexecution-Based Testing
Walkthroughs
Inspections
Walkthroughs are shorter and more
informal than inspections.
Goal of both is to record faults, not to
correct them.
Execution-Based Testing
Utility
Reliability
Robustness
Performance
Correctness
Black-Box / White-Box Testing
Black-box tests are driven by the programs
specification
White-box tests are driven by the programs
implementation

Black- White-box
Specification Program
box tests tests
Test Automation
If a manual test costs $X to run the first
time, it will cost $X to run every time
thereafter.
An automated test can cost 3 to 30
times $X the first time, but will cost
about $0 after that.
Any Questions?
Too Many Possible Paths
There are 5 paths from A to X without
passing through the loop.
There are 520 paths from A to X after
passing through the loop 20 times.
There are 5 + 52 + 53 ++ 520 = 100
trillion possible paths in this program.
If you could test a path per second it
would take more than 3 million years!
Black Box Testing
Checks that the product conforms to
specifications
Cannot determine how much code has
been tested

Omissions detected
by black-box tests
Program
White Box Testing
Allows tester to be sure every
statement has been tested.
Difficult to discover missing
functionality.

Commissions detected
Program by White-box tests

Common questions

Powered by AI

It is impossible to identify every bug due to the numerous paths, inputs, and potential user environments. Programs can have an infinite number of input sequences and environment variables which makes exhaustive testing unfeasible, as illustrated by the example of finding 100 trillion paths in a single program . This limitation affects the testing process by necessitating prioritization of testing scenarios and adoption of both black-box and white-box testing methods, focusing on certain outputs to meet practical testing timelines .

Costs are a critical factor influencing the extent of software testing. While thorough testing reduces customer support expenses by minimizing bugs, it incurs substantial up-front costs. Companies perform cost-benefit analyses to balance these outcomes, deciding how much to invest in testing relative to potential post-release support expenses and customer dissatisfaction leading to churn . Additionally, market timing factors into these considerations, as delaying products for extensive testing may mean losing competitive advantages .

Customer support costs are a critical factor in resource allocation for software testing. Comprehensive testing reduces bugs, thereby lowering customer support costs stemming from post-release issues and bug-related calls . Companies must weigh immediate testing investment against potential long-term customer support expenses, as neglected testing leads to higher support costs and damage to reputation as customers continue facing unresolved issues . Through effective testing, companies aim to decrease overall operational costs and enhance customer satisfaction.

Beta testing allows companies to understand what is most important to customers by providing use cases representative of actual customer environments . It also aids in performing extensive configuration testing beyond the testing lab capabilities . However, its effectiveness is limited by beta testers usually being 'techies' with a higher tolerance for bugs, failing to represent the average customer base. Many potential issues like usability problems or misunderstood bugs go unreported, diminishing its effectiveness in ensuring overall software quality .

Black-box testing focuses on verifying software outputs based on specifications without considering underlying code, which helps detect omissions in code functionalities . In contrast, white-box testing examines the internal working of the software disclosing errors in code implementations, specifically commissions . Together, they complement each other as black-box testing confirms conformance to functional requirements, while white-box testing ensures code quality, enhancing overall software robustness and correctness .

Manual testing is limited by its resource-intensive nature, as it requires human oversight for each execution, incurring costs every time it is run . It is less efficient over time compared to automated testing, which, despite higher initial setup costs, becomes cost-effective as it can be executed repeatedly at minimal cost with no additional personnel needed . Thus, automated testing allows more efficient resource allocation, particularly for repetitive tasks, enabling focus on complex testing scenarios where human intervention is indispensable.

Testing must be integrated at all phases to ensure that each phase's output is correctly verified before progressing, facilitating early fault detection. This integration helps build upon and verify results from preceding phases, ensuring continuity and cohesion in the development process. Non-execution testing is crucial in early phases where the program isn't yet executable, while both execution and non-execution testing are needed in later phases . Isolating testing as a separate phase would overlook the need for iterative validation crucial to agile and continuous integration development methodologies .

Automated testing plays a crucial role in improving testing efficiency and reducing long-term costs. While initial automation setup costs 3 to 30 times more than manual testing, the cost of running automated tests thereafter is minimal, saving resources in repetitive testing scenarios . This economic advantage is substantial in large-scale projects where frequent retesting is necessary, directly impacting the organization's ability to maintain software quality while minimizing testing expenses .

Reliance on untrained personnel can severely impact the effectiveness of software testing. It often results in inadequate test plan creation and improper execution due to a lack of formal specifications and automated tools . This may lead to an increase in bugs escaping to the end-users, higher customer support costs, and potential loss of company reputation as customers seek more reliable solutions . Software companies may need to revisit their cost-benefit analysis for investing in training and tools to ensure comprehensive testing.

Replicating user environments is challenging due to the diverse combinations of hardware, peripherals, OS, and applications encountered by end-users . These variables increase the complexity and scope of testing, often making it impractical to simulate exact conditions, particularly in large-scale networks or bespoke setups. This challenge impacts testing outcomes by potentially missing bugs specific to untested configurations, which could lead to undetected faults manifesting in real-world scenarios . Addressing these requires strategic use of beta testing and robust testing environments resembling user scenarios as closely as possible.

Software Testing
Overview
Definition of Software Testing
Problems with Testing
Benefits of Testing
Effective Methods for Testing
Definition of Software Testing
Software testing is the process of 
executing a software system to determine 
whether it match
“Program testing can be a very effective 
way to show the presence of bugs, but it 
is hopelessly inadequate for showing 
the
Why Test?
Q: If all software is released to 
customers with faults, why should we 
spend so much time, effort, and money 
on
Cost of Delaying the Release 
of a Software Product
Timing is another important factor to 
consider.
New products: The first
Beta Testing
Customers test for free!
Seems to give you test cases 
representative of customer use.
Helps to determine what i
Problems with Beta Testing
Most beta testers are “techies” who 
have a higher tolerance of bugs.  They 
do not represent the
Cutting Testing Costs can 
Increase other Costs
Customer support can be very 
expensive.  Less bugs = less calls.
Customers w
Problems with Testing
Since it is impossible to find every fault 
in a software system, bugs will be found 
by customers afte

You might also like