STM_Unit 1_Part 1
STM_Unit 1_Part 1
Unit-I
Presented by:
Dr. B.Rajalingam
Associate Professor
Department of Computer Science and Engineering,
St. Martin's Engineering College (UGC Autonomous)
Syllabus
UNIT - I
• Introduction: Purpose of testing, Dichotomies, model for testing, consequences of bugs, taxonomy
of bugs.
• Flow graphs and Path testing: Basics concepts of path testing, predicates, path predicates and
achievable paths, path sensitizing, path instrumentation, application of path testing.
UNIT - II
• Transaction Flow Testing: transaction flows, transaction flow testing techniques. Dataflow testing:
Basics of dataflow testing, strategies in dataflow testing, application of dataflow testing.
• Domains and paths, Nice & ugly domains, domain testing, domains and interfaces testing, domain
and interface testing, domains and testability.
April 22, 2025 STM(Unit 1) - Dr. B.Rajalingam 2
Syllabus
UNIT - III
• Paths, Path products and Regular expressions: path products & path expression, reduction procedure, applications,
regular expressions & flow anomaly detection.
• Logic Based Testing: overview, decision tables, path expressions, kv charts, specifications.
• State graphs, good & bad state graphs, state testing, Testability tips.
• Motivational overview, matrix of graph, relations, power of a matrix, node reduction algorithm, building tools.
(Student should be given an exposure to a tool like JMeter or Win-runner).
REFERENCE BOOKS:
Prerequisites
Course Objectives
To provide knowledge of the concepts in software testing such as testing process, criteria,
strategies, and methodologies.
To develop skills in software test automation and management using latest tools.
Course Outcomes:
•Design and develop the best test strategies in accordance to the development model.
• Our Software testing tutorial includes all topics of Software testing such as Methods such as
Black Box Testing, White Box Testing, Visual Box Testing and Gray Box Testing.
• Levels such as Unit Testing, Integration Testing, Regression Testing, Functional Testing.
• System Testing, Acceptance Testing, Alpha Testing, Beta Testing, Non-Functional testing,
Security Testing, Portability Testing.
• Validate the quality of a software using the minimum cost and efforts.
• Generate high-quality test cases, perform effective tests, and issue correct and helpful problem
reports.
• Verification in software testing is the process when your team just need to
check whether the software, system or framework consistent, aligned with the
requirements of a documentation.
• Validation is the process that your team needs to verify the accuracy of the
system. In this process, you will look back to the product, system and think
about what users actually want and what has been done.
April 22, 2025 STM(Unit 1) - Dr. B.Rajalingam 14
Cont…
• Error is a deviation from the actual and the expected result. It represents the
mistakes made by people.
• Bug is an error found BEFORE the application goes into production. A
programming error that causes a program to work poorly, produce incorrect
results, or crash. An error in software or hardware that causes a program to
malfunction.
• Defect happens once the error is identified during testing, it is logged as a ‘Defect’
in the tracking system.
• Failure is the incapacity of a system to conduct its required functions within
clarified performance requirements, literally a disappointment or a let down. And
no one wants to do business with a failure.
A Test
Passes: Functionality OK.
Fails: Application functionality NOK.
Bug/Defect/Fault: Deviation from expected functionality.
It’s not always obvious.
• Testing includes an examination of code and also the execution of code in various
environments, conditions as well as all the examining aspects of the code.
• In the current scenario of software development, a testing team may be separate
from the development team so that Information derived from testing can be used to
correct the process of software development.
• The success of software depends upon acceptance of its targeted audience, easy
graphical user interface, strong functionality load test, etc.
• For example, the audience of banking is totally different from the audience of a
video game.
• Therefore, when an organization develops a software product, it can assess whether
the software product will be beneficial to its purchasers and other audience.
April 22, 2025 STM(Unit 1) - Dr. B.Rajalingam 18
What are the benefits of Software Testing?
• Cost-Effective: It is one of the important advantages of software testing. Testing
any IT project on time helps you to save your money for the long term. In case if
the bugs caught in the earlier stage of software testing, it costs less to fix.
• Security: It is the most vulnerable and sensitive benefit of software testing.
People are looking for trusted products. It helps in removing risks and problems
earlier.
• Product quality: It is an essential requirement of any software product. Testing
ensures a quality product is delivered to customers.
• Customer Satisfaction: The main aim of any product is to give satisfaction to
their customers. UI/UX Testing ensures the best user experience.
• Automation testing is a process of converting any manual test cases into the test
scripts with the help of automation tools, or any programming language is known
as automation testing.
• With the help of automation testing, we can enhance the speed of our test
execution because here, we do not require any human efforts.
• The white box testing is done by Developer, where they check every line of a code
before giving it to the Test Engineer.
• Since the code is visible for the Developer during the testing, that's why it is also
known as White box testing.
• The black box testing is done by the Test Engineer, where they can check the
functionality of an application or the software according to the customer /client's
needs.
• In this, the code is not visible while performing the testing; that's why it is known
as black-box testing.
• Gray box testing is a combination of white box and Black box testing.
• It can be performed by a person who knew both coding and testing. And if the
single person performs white box, as well as black-box testing for the application,
• First, tester observes all documents related to software, to select testing areas.
• Tester analyses requirement documents to cover all requirements stated by the
customer.
• Tester develops the test cases according to the requirement document.
• All test cases are executed manually by using Black box testing and white box
testing.
• If bugs occurred then the testing team informs the development team.
• The Development team fixes bugs and handed software to the testing team for a
retest.
• It does not require programming knowledge while using the Black box method.
• It is used to test dynamically changing GUI designs.
• Tester interacts with software as a real user so that they are able to discover
usability and user interface issues.
• It ensures that the software is a hundred percent bug-free.
• It is cost-effective.
• Easy to learn for new testers.
Bug Prevention
Mix of various approaches, depending on factors culture, development environment,
application, project size, history, language
Inspection Methods
Design Style
Static Analysis
Languages – having strong syntax, path verification & other controls
Design methodologies & development environment
Its better to know:
Pesticide paradox
Complexity Barrier
8 A theory establishes what testing can do or There are only Rudimentary Results (on how
cannot do. much can be done. Time, effort, how etc.
depends on human ability).
For a given model of programs, Structural tests may be done first and later the
Functional, Or vice-versa. Choice depends on which seems to be the natural choice.
Both are useful, have limitations and target different kind of bugs. Functional tests can
detect all bugs in principle, but would take infinite amount of time. Structural tests are
inherently finite, but cannot detect all bugs.
The Art of Testing is how much allocation % for structural vs how much % for
functional.
3 Tries to do the job in simplest & cleanest way, Tester needs to suspicious, uncompromising, hostile and
trying to reduce the complexity. obsessed with destroying program.
2. A module implies a size, an internal structure and an interface, or, in other words.
3. A module (well defined discrete component of a system) consists of internal complexity &
interface complexity and has a size.
So:
Optimize the size & balance internal & interface complexity to increase efficiency
Optimize the test design by setting the scopes of tests & group of tests (modules) to minimize cost of test design, debugging, execution & organizing – without compromising effectiveness.
# Small Big
1 More efficiently done by informal, A large of programmers & large of components.
intuitive means and lack of formality – if
it’s done by 1 or 2 persons for small &
intelligent user population.
2 Done for e.g., for oneself, for one’s office Program size implies non-linear effects (on
or for the institute. complexity, bugs, effort, rework quality).
3 Complete test coverage is easily done. Acceptance level could be: Test coverage of
100% for unit tests and for overall tests ≥ 80%.
1. PROJECT:
An Archetypical System (product) allows tests without complications (even for a large
project).
Testing a one shot routine & very regularly used routine is different.
A model for project in a real world consists of the following 8 components:
1) Application: An online real-time system (with remote terminals) providing timely
responses to user requests (for services).
2) Staff: Manageable size of programming staff with specialists in systems design.
3) Schedule: project may take about 24 months from start to acceptance. 6 month
maintenance period.
4) Specifications: is good. documented. Undocumented ones are understood well in the team.
April 22, 2025 STM(Unit 1) - Dr. B.Rajalingam 53
A Model for Testing
4) Acceptance test: Application is accepted after a formal acceptance test. At first it’s the
customer’s & then the software design team’s responsibility.
6) Standards:
Programming, test and interface standard (documented and followed).
A centralized standards data base is developed & administrated
Environment Unexpected
Environment
Model
Program Expected
Program Tests Outcome
Model
Nature &
Bug Model
Psychology
A B D
A B
C
Sequence of Testing:
Unit/Component tests for A, B. Integration tests for A & B. Component testing for
(A,B) component
• Assign flexible & relative rather than absolute values to the bug (types).
• Number of bugs and their severity are factors in determining the quality quantitatively.
• Organizations design & use quantitative, quality metrics based on the above.
• Parts are weighted depending on environment, application, culture, correction cost, current
SDLC phase & other factors.
• Nightmares
• Define the nightmares – that could arise from bugs – for the context of the
organization/application.
• Quantified nightmares help calculate importance of bugs.
• That helps in making a decision on when to stop testing & release the product.
To study the consequences, nightmares, probability, importance, impact and the methods of prevention
and correction.
Adopt known taxonomy to use it as a statistical framework on which your testing strategy is based.
6 main categories with sub-categories..
1)Requirements, Features, Functionality Bugs 24.3% bugs
2)Structural Bugs 25.2%
3)Data Bugs 22.3%
4)Coding Bugs 9.0%
5)Interface, Integration and System Bugs 10.7%
6)Testing & Test Design Bugs 2.8 %
3. Data Bugs
Depend on the types of data or the representation of data. There are 4 sub categories.
Due to data object specs., formats, # of objects & their initial values.
Generalized components with reusability – when customized from a large parametric data to specific
installation.
Remedies (prevention & correction):
Using control tables in lieu of code facilitates software to handle many transaction types with fewer data
bugs. Control tables have a hidden programming language in the database.
Caution - there’s no compiler for the hidden control language in data tables
Examples Examples
Generic & shared variable Telecom system software: generic parameters, a generic large program & site
adapter program to set parameter values, build data declarations etc.
Shared data structure Postprocessor : to install software packages. Data is initialized at run time –
with configuration handled by tables.
Prevention Prevention
4. Coding Bugs
Coding errors create other kinds of bugs.
Syntax errors are removed when compiler checks syntax.
Coding errors
typographical, misunderstanding of operators or statements or could be just
arbitrary.
Documentation Bugs
Erroneous comments could lead to incorrect maintenance.
Testing techniques cannot eliminate documentation bugs.
Solution:
Inspections, QA, automated data dictionaries & specification systems.
Bugs not ascribed to a particular component, but result from the totality of
interactions among many components such as:
programs, data, hardware, & the O.S.
Remedies:
Thorough testing at all levels and the test techniques mentioned below
Test Techniques
Transaction-flow testing.
All kinds of tests at all levels as well as integration tests - are useful.
Good design inhibits bugs and is easy to test. The two factors are multiplicative and
results in high productivity.