Professional Documents
Culture Documents
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
Dataflow testing: Basics of dataflow testing, strategies in dataflow testing, application of dataflow testing.
UNIT - III
Domain Testing: Domains and paths, Nice & ugly domains, Domain Testing, domains and interfaces testing,
domain and interface testing, domains and testability
UNIT - IV
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.
UNIT - V
State, State Graphs and Transition testing: State graphs, good & bad state graphs, state testing, Testability tips.
Graph Matrices and Application: Motivational overview, matrix of graph, relations, power of a matrix, Node
Reduction algorithm.
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.
1. Introduction:
What is testing?
2. Purpose of Testing:
1. It is done to catch bugs.
Bugs arise due to software developers mistakes. Statistics show that around 3 bugs/100
programming statements exist.
If the software contains more bugs then there is a high chance of rejection. If the
software product is rejected then developers needs to do rework.
The biggest part of software cost is the cost of bugs and the corresponding rework.
Testing not only focus on Bug detection and it is also focus on bug prevention. If a
bug is prevented, the corresponding rework is saved. (Rework includes bug reporting,
debugging, corrections, retesting the corrections, re-distributions, re-installations etc.).
1. Testing Vs Debugging
Testing Debugging
Planned, Designed and Scheduled. Procedures & Duration are not constrained.
a) Functional Testing:
Treats a program as a black box.
That is, testers may not know about the internal code details (programming style,
control method, source language, and database details).
Here the testers give the different inputs and checks the outputs.
b) Structural Testing:
Treats a program as a white box.
That is, testers know about the internal code details (programming style, control
method, source language, and database details).
Here also testers give the different inputs and checks the outputs.
3 Designer vs Tester
Writes the code and test the same code Does not write the code but test the code.
called unit testing
Self code (independent) testing is there. Tests independent codes and entire code also.
Tries to do the job in simplest & Testers don’t bather about simplest & cleanest
cleanest way, trying to reduce the way. Their intension is to test in all perspectives,
complexity. not for reduce the complexity
Modularity Efficiency
Smaller the component easier to If the program size is large, then can’t test
understand. efficiently. Because can’t understand large
programs properly.
Easily find the bugs in modules. Higher efficiency at module level, when a bug
occurs with small components.
Small Big
Smaller the component easier to If the program size is large, then can’t test
understand. efficiently. Because can’t understand large
programs properly.
Easily find the bugs in small programs. Not easy to find the bugs in large programs.
Builder:
Buyer:
1. Project:
A model for project in a real world consists of the following 8 components:
1 Application: Application is simply calling as App (software project), used by the users.
2 Staff: Staff means employees, who are working for Application development
(programmers, testers etc.)
3 Acceptance test: Application is accepted after a formal acceptance test. At first it’s
the customer’s & then the software design team’s responsibility.
4 Personnel: From the personnel of the project team, the technical staff comprises of: a
combination of experienced professionals, junior programmers (1 – 3 yrs) and some with
no experience with varying degrees of knowledge of the application.
6 Objectives: (of a project) A system is expected to operate profitably for > 10 yrs after
installation). Similar systems with up to 75% code in common may be implemented in future.
7 Source: (for a new project) is usually a combination of new code and old code.
8 History: Entire project details (development, testing and other details) are written in
documents. These documents will be used in future to reveal the history about the project
details.
Environment Unexpected
Environment Model
Expected
Program Out
Program Model Tests
Come
Nature &
Psychology Bug Model
2. Roles of Models for Testing
1) Overview:
In testing, if the Results are expected then it’s okay and project is
accepted otherwise (unexpected results) then revise tests & program.
Revise bug model & program.
2) Environment:
In software point of view the environment means all hardware & software
required to make the program run.
3) Program:
Program means set of instructions, written in any programming language
like C, C++, and JAVA etc.
4) Bugs: (bug model)
Bug means wrong variable or error in code etc..Generally bugs halm
the project.
5) Tests:
Tests are Formal procedures in any projects to find bugs.
6) Testing & Levels:
2) Integration Testing:
Integration is a process of aggregation of components into larger
components.
Integration testing - testing all the components called Integration testing.
A B D
A B
C
In above diagrams:
A, B, C, D are units, testing them independently called Unit Testing.
(A, B) is component, testing the both A,B called Component Testing.
((A,B),C,D) Testing is called Integration testing.
3) System Testing
System is a big component, testing this called System testing.
5. Consequences of BUGS:
(how bugs may affect users)
• Mild
• Basic level bug such as misspelled output or mal-aligned print-out.
• Moderate
• Outputs are misleading or redundant impacting performance.
• Annoying
• Systems behavior is dehumanizing for e.g. names are truncated/modified
arbitrarily, bills for $0.0 are sent.
• Till the bugs are fixed operators must use unnatural command sequences
to get proper response.
• Disturbing
• Legitimate transactions refused.
• For e.g. ATM machine may malfunction with ATM card / credit card.
• Serious
• Losing track of transactions & transaction events. Hence accountability is
lost.
• Very serious
• System does another transaction instead of requested e.g. Credit
another account, convert withdrawals to deposits.
• Extreme
• Frequent & Arbitrary - not sporadic & unusual.
• Intolerable
• Long term unrecoverable corruption of the Data base.
(Not easily discovered and may lead to system down.)
• Catastrophic
• System fails and shuts down.
• Infectious
• Corrupts other systems, even when it may not fail.
6. Taxanomy of bugs:
Transaction flow tests, syntax testing, domain testing, logic testing, and state
test - can eliminate requirements & Feature Bugs.
2. Structural Bugs
Depend on the types of data or the representation of data. There are 4 sub categories.
Due to an error in a shared storage Appear in source code or data base, directly or
object initialization. indirectly
Examples Examples
Prevention Prevention
Examples: name, hash code, function using these. A variable in different contexts.
Severity & subtlety increases from contents to attributes as they get less formal.
Structural bugs may be due to wrong declaration or when same contents are
interpreted by multiple structures differently (different mapping).
Attribute bugs are due to misinterpretation of data type, probably at an interface
Preventive Measures (prevention & correction)
Good source lang. documentation & coding style (incl. data dictionary).
Data structures be globally administered. Local data migrates to global.
Strongly typed languages prevent mixed manipulation of data.
In an assembly lang. program, use field-access macros & not directly accessing any
field.
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.
i. External Interfaces
ii. Internal Interfaces
iii. Hardware Architecture Bugs
iv. Operating System Bugs
v. Software architecture bugs
vi. Control & Sequence bugs
vii. Resource management bugs
viii. Integration bugs
ix. System bugs
Ans: Dichotomies 2
Ans: Dichotomies 2
Q. Specify on which factors the importance of bugs depends. Give the metric for it
(importance).
Q. What are the differences between static data and dynamic data?
Ans: Dichotomies 4