SlideShare a Scribd company logo
1 of 76
Download to read offline
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Software Testing
BCA – V
Paper Code 307
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.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
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.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
“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]
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Why Test?
Q: If all software is released to
customers with faults, why should we
spend so much time, effort, and money
on testing?
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Black-Box / White-Box Testing
• Black-box tests are driven by the program’s
specification
• White-box tests are driven by the program’s
implementation
Specification ProgramBlack-
box tests
White-box
tests
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Black Box Testing
• Checks that the product conforms to
specifications
• Cannot determine how much code has
been tested
Program
Omissions detected
by black-box tests
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
White Box Testing
• Allows tester to be sure every statement
has been tested.
• Difficult to discover missing functionality.
Commissions detected
by White-box testsProgram
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Basic Definitions
• Test case: specifies
– Inputs + pre-test state of the software
– Expected results (outputs an state)
• Black-box testing: ignores the internal logic of the
software, and looks at what happens at the interface
(e.g., given this inputs, was the produced output
correct?)
• White-box testing: uses knowledge of the internal
structure of the software
– E.g., write tests to “cover” internal paths
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Testing Approaches
• Will look at a sample of approaches for
testing
• White-box testing
– Control-flow-based testing
– Data-flow-based testing
• Black-box testing
– Equivalence partitioning
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Control-flow-based Testing
• A traditional form of white-box testing
• Step 1: From the source, extract a CFG
• Step 2: Design test cases to cover certain elements of
this graph
– Nodes, edges, paths
• Basic idea: given the CFG, define a coverage
target and write test cases to achieve it
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Statement Coverage
• Traditional target: statement coverage
– Need to write test cases that cover all nodes in
the control flow graph
• Intuition: code that has never been executed
during testing may contain errors
– Often this is the “low-probability” code
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Branch Coverage
• Target: write test cases that cover all
branches of predicate nodes
– True and false branches of each IF
– The two branches corresponding to the
condition of a loop
– All alternatives in a SWITCH statement
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Branch Coverage
• Statement coverage does not imply branch
coverage
• Can you think of an example?
• Motivation for branch coverage: experience
shows that many errors occur in “decision
making” (i.e., branching)
– Plus, it subsumes statement coverage.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Example
• Same example as before
• Test case #1: follows path 1-
2-exit
• Test case #2: 1-2-3-4-5-7-8-
2-3-4-5-7-8-2-exit
• Problem?
1
2
3
4
5 6
7
8
T F
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Achieving Branch Coverage
• For decades, branch coverage has been
considered a necessary testing minimum
• To achieve it: pick a set of start-to-end paths in
the CFG, that cover all branches
– Consider the current set of chosen paths
– Try to add a new path that covers at least one
edge that is not covered by the current paths
• Then write test cases to execute these paths
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Some Observations
• It may be impossible to execute some of the
chosen paths from start-to-end
– Why? Can you think of an example?
– Thus, branches should be executed as part of
other chosen paths
• There are many possible sets of paths that
achieve branch coverage
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Example
if x ≤ y
x=
y
T
F
if x == y
z=
1
z=
0
FT
Candidate start-to-end paths:
(1) green path
(2) red path
% branch coverage?
Problem?
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Data-flow-based Testing
• Basic idea: test the connections between variable
definitions (“write”) and variable uses (“read”)
• Starting point: variation of the control flow graph
– Statement nodes represent one statement
• Set Def(n) contains variables that are defined at
node n (i.e., they are written)
– The definitions at node nSet Use(n): variables that
are read
– The uses at node nStudies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Remember Reaching Definitions
• Definition A statement that may change the
value of a variable (e.g., x = i+5)
• A definition of a variable x at node k reaches
node n if there is a path from k to n, clear of a
definition of x.
k
n
x = …
… = x
x = …
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Def-use Pairs
• A def-use pair (DU pair) for variable x is a pair of
nodes (n1,n2) such that
– x is in Def(n1)
– The definition of x at n1 reaches n2
– x is in Use(n2)
• In other words, the value that is assigned to x at n1
is used at n2
– Since the definition reaches n2, the value is not “killed”
along some path n1...n2.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Examples of Reaching Definitions
Assume y is an input variable
1 s:= 0;
2 x:= 0;
3 while (x<y) {
4 x:=x+3;
5 y:=y+2;
6 if (x+y<10)
7 s:=s+x+y;
else
8 s:=s+x-y;
1
2
3
4
5
6
7 8
9
1
0
What are the def-use pairs for s?
What are the def-use pairs for x?
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Data-flow-based Testing
• Data-flow-based coverage target: DU pair coverage
– Compute all DU pairs, and construct test cases that cover
these pairs. HOW DO WE COMPUTE DU PAIRS?
• Several coverage targets (criteria), with different
relative strength
• Motivation for data-flow-based testing coverage:
see the effects of using the values produced by
computations Focuses on the data, while control-flow-
based testing focuses on the control
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Finally, the targets (criteria):
All-defs criterion
• If variable x is in Def(n1), the all-defs criterion requires the
test data to exercise at least one path free of definition of x
which goes from n1 to some node n2 such that (n1,n2) is a DU
pair for x.
– Remember, x is defined at n1,
– The definition of x at n1 reaches n2, and
– x is used at n2
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
All-uses criterion
• If variable x is in Def(n1), the all-uses criterion
requires the test data to exercise at least one
path free of definition of x which goes from
n1 to each node n2 such that (n1,n2) is a DU
pair for x.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
All-DU-paths criterion
• If variable x is in Def(n1), the all-DU-paths
criterion requires the test data to exercise
each path free of definition of x which goes
from n1 to each node n2 such that (n1,n2) is a
DU pair for x.
• So what is the relative strength of the three
criteria: All-defs, All-uses, All-DU-paths?
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
All-defs, all-uses, all-du-paths
Assume y is input
1 s:= 0;
2 x:= 0;
3 while (x<y) {
4 x:=x+3;
5 y:=y+2;
6 if (x+y<10)
7 s:=s+x+y;
else
8 s:=s+x-y;
}
1. Design test cases that cover all-uses
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Black-box Testing
• Unlike white-box testing, no knowledge
about the internals of the code
• Test cases are designed based on
specifications
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Equivalence Partitioning
• Basic idea: consider input/output domains and partition them into
equiv. classes
– For different values from the same class, the software should
behave equivalently
• Use test values from each class
– Example: if the range for input x is 2..5, there are three classes:
“<2”, “between 2..5”, “5<”
– Testing with values from different classes is more likely to uncover
errors than testing with values from the same class
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Equivalence Classes
• Examples of equivalence classes
– Input x in a certain range [a..b]: this defines three classes “x<a”,
“a<=x<=b”, “b<x”
– Input x is boolean: classes “true” and “false”
– Some classes may represent invalid input
• Choosing test values
– Choose a typical value in the middle of the class(es) that represent
valid input
– Also choose values at the boundaries of all classes: e.g., if the range is
[a..b], use a-1,a, a+1, b-1,b,b+1
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Example
• Suppose our spec says that the code accepts
between 4 and 24 inputs, and each one is a 3-digit
positive integer
• One dimension: partition the number of inputs
– Classes are “x<4”, “4<=x<=24”, “24<x”
– Chosen values: 3,4,5, 14, 23,24,25
• Another dimension: partition the integer values
– Classes are “x<100”, “100<=x<=999”, “999<x”
– Chosen values: 99,100,101, 500, 998,999,1000
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Another Example
• Similar approach can be used for the output: exercise
boundary values
• Suppose that the spec says “the output is between 3
and 6 integers, each one in the range 1000-2500
• Try to design input that produces
– 3 outputs with value 1000
– 3 outputs with value 2500
– 6 outputs with value 1000
– 6 outputs with value 2500
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Example: Searching
• Search for a value in an array
– Return value is the index of some occurrence
of the value, or -1 if the value does not occur in
the array
• One partition: size of the array
– Since people often make errors for arrays of
size 1, we decide to create a separate
equivalence class
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Example: Searching
• Another partition: location of the value
– Four classes: “first element”, “last element”, “middle element”, “not
found”
Array Value Output
Empty 5 -1
[7] 7 0
[7] 2 -1
[1,6,4,7,2] 1 0
[1,6,4,7,2] 4 2
[1,6,4,7,2] 2 4
[1,6,4,7,2] 3 -1
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Levels of Testing
• Unit Testing
• Integration Testing
• Validation Testing
– Regression Testing
– Alpha Testing
– Beta Testing
• Acceptance Testing
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Unit Testing
• Algorithms and logic
• Data structures (global and local)
• Interfaces
• Independent paths
• Boundary conditions
• Error handling
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Why Integration Testing Is Necessary
• One module can have an adverse effect on
another
• Subfunctions, when combined, may not
produce the desired major function
• Individually acceptable imprecision in
calculations may be magnified to
unacceptable levels
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Why Integration Testing Is Necessary
(cont’d)
• Interfacing errors not detected in unit testing
may appear
• Timing problems (in real-time systems) are not
detectable by unit testing
• Resource contention problems are not
detectable by unit testing
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Top-Down Integration
1. The main control module is used as a driver,
and stubs are substituted for all modules
directly subordinate to the main module.
2. Depending on the integration approach
selected (depth or breadth first),
subordinate stubs are replaced by modules
one at a time.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Top-Down Integration (cont’d)
3. Tests are run as each individual module is
integrated.
4. On the successful completion of a set of
tests, another stub is replaced with a real
module
5. Regression testing is performed to ensure
that errors have not developed as result of
integrating new modules
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Problems with Top-Down Integration
• Many times, calculations are performed in the
modules at the bottom of the hierarchy
• Stubs typically do not pass data up to the higher
modules
• Delaying testing until lower-level modules are ready
usually results in integrating many modules at the
same time rather than one at a time
• Developing stubs that can pass data up is almost as
much work as developing the actual module
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Bottom-Up Integration
• Integration begins with the lowest-level modules, which are
combined into clusters, or builds, that perform a specific
software subfunction
• Drivers (control programs developed as stubs) are written to
coordinate test case input and output
• The cluster is tested
• Drivers are removed and clusters are combined moving
upward in the program structure
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Problems with Bottom-Up Integration
• The whole program does not exist until
the last module is integrated
• Timing and resource contention
problems are not found until late in
the process
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Validation Testing
• Determine if the software meets all of the requirements
defined in the SRS
• Having written requirements is essential
• Regression testing is performed to determine if the software
still meets all of its requirements in light of changes and
modifications to the software
• Regression testing involves selectively repeating existing
validation tests, not developing new tests
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Alpha and Beta Testing
• It’s best to provide customers with an outline
of the things that you would like them to focus
on and specific test scenarios for them to
execute.
• Provide with customers who are actively
involved with a commitment to fix defects
that they discover.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Acceptance Testing
• Similar to validation testing except that
customers are present or directly
involved.
• Usually the tests are developed by the
customer
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Methods
• White box or glass box testing
• Black box testing
• Top-down and bottom-up for performing
incremental integration
• ALAC (Act-like-a-customer)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Validation Readiness Review
• During informal validation developers can
make any changes needed in order to comply
with the SRS.
• During informal validation QA runs tests and
makes changes as necessary in order for tests
to comply with the SRS.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Formal Validation
• The same tests that were run during informal
validation are executed again and the results
recorded.
• Software Problem Reports (SPRs) are submitted
for each test that fails.
• SPR tracking is performed and includes the status
of all SPRs ( i.e., open, fixed, verified, deferred,
not a bug)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Planning
• The Test Plan – defines the scope of the work
to be performed
• The Test Procedure – a container document
that holds all of the individual tests (test
scripts) that are to be executed
• The Test Report – documents what occurred
when the test scripts were run
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Plan
• Questions to be answered:
– How many tests are needed?
– How long will it take to develop those tests?
– How long will it take to execute those tests?
• Topics to be addressed:
– Test estimation
– Test development and informal validation
– Validation readiness review and formal validation
– Test completion criteria
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Estimation
• Number of test cases required is based on:
– Testing all functions and features in the SRS
– Including an appropriate number of ALAC (Act Like A
Customer) tests including:
• Do it wrong
• Use wrong or illegal combination of inputs
• Don’t do enough
• Do nothing
• Do too much
– Achieving some test coverage goal
– Achieving a software reliability goal
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Considerations in
Test Estimation
• Test Complexity – It is better to have many small
tests that a few large ones.
• Different Platforms – Does testing need to be
modified for different platforms, operating systems,
etc.
• Automated or Manual Tests – Will automated tests
be developed? Automated tests take more time to
create but do not require human intervention to
run.
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Estimating Tests Required
SRS
Reference
Estimated
Number of
Tests
Required
Notes
4.1.1 3 2 positive and 1 negative test
4.1.2 2 2 automated tests
4.1.3 4 4 manual tests
4.1.4 5 1 boundary condition, 2 error
conditions, 2 usability tests
…
Total 165
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
Test Report
• Completed copy of each test script with evidence
that it was executed (i.e., dated with the signature
of the person who ran the test)
• Copy of each SPR showing resolution
• List of open or unresolved SPRs
• Identification of SPRs found in each baseline along
with total number of SPRs in each baseline
• Regression tests executed for each software
baseline
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OBJECT ORIENTED TESTING
SYSTEM TESTING
UNIT TESTING
INTEGRATION
TESTING
INHERITANCE
POLYMORPHISM
ENCAPSULATION
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
TRADITIONAL DEVELOPMENT & TESTING
(WATERFALL LIFE CYCLE)
• REQUIREMENTS SPEC SYSTEM TESTING
• PRELIMINARY DESIGN INTEGRATION
TESTING
– FUNCTIONAL
– DECOMPOSITION
• DETAILED DESIGN UNIT TESTING
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
TRADITIONAL TESTING
• SYSTEM
– VERIFY SW SATISFIES ALL SW REQRS
• INTEGRATION
– BASED ON STRUCTURE OF DESIGN
– TOP DOWN OR BOTTOM UP APPROACH
• UNIT
– ENCAPSULATES FUNCTIONALITY
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO DEVELOPMENT & TESTING
• DEVELOPMENT BASED ON BEHAVIOUR
• COMPOSITION
• TYPICALLY RAPID PROTOTYPING
• INCREMENTAL APPROACH
• 3 TRADITIONAL TESTING LEVELS ARE NOT AS
CLEARLY DEFINED
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OBJECT ORIENTED TESTING
• SYSTEM
– SAME AS TRADITIONAL
– STILL BASED ON REQRS SPEC
• UNIT
– TWO COMMON STRUCTURES USED
• METHOD*
• CLASS
– SAME AS TRADITIONAL(DRIVERS & STUBS)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
METHOD 2
METHOD 1
METHOD METHOD METHOD
METHOD
METHOD
OBJECT CLASS A
B C D
E
F
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
METHOD 2
METHOD 1
METHOD METHOD METHOD
METHOD
METHOD
OBJECT CLASS A
B C
D
E
F
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO INTEGRATION TESTING
• MAIN PROGRAM IS MINIMIZED
• MOST COMPLICATED PART OF OO TESTING
• TESTING BASED ON COMPOSITION IN BOTTOM UP APPROACH
• USE OF CLUSTERS
• ORD - CLASS DEPENDENCIES
• BBD OR DIRECTED GRAPHS - SHOWS METHOD DEPENDENCIES
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
meth1
meth3meth2
Class 1
A
B
OUTPUT PORT EVENT
A
meth1
meth3
meth2
meth2
meth1
B
OUTPUT PORT EVENT
Class 2
Class 3
MM-Path
1
2
3
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO CONCEPTS/EFFECTS ON TESTING
• ENCAPSULATION
• POLYMORPHISM
• INHERITANCE
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
ENCAPSULATION
• CLASS STRUCTURE
• INTERFACE DEFINED BY PUBLIC METHODS
• BEHAVIOR DEFINED BY METHODS THAT
OPERATE ON ITS INSTANCE DATA (IN
CONVENTIONAL SEPARATE)
• HELPS ENFORCE INFO HIDING
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
ENCAPSULATION TESTING ISSUES
• MINIMIZES RIPPLE EFFECT (AT THE UNIT
LEVEL) OF MAKING A CHANGE
• HIGHLY DELOCALIZED
– CHANGE COULD RESULT IN SIGNIFICANT
REGRESSION TESTING
• ORDER OF TESTING IS IMPORTANT (CAN
REDUCE TESTING EFFORT)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
METHOD
METHOD
CLASS A
CLASS B
CLASS C
METHOD
USES USES
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
POLYMORPHISM
• AN ATTRIBUTE MAY HAVE MORE THAN ONE
SET OF VALUES
• AN OPERATION MAY BE IMPLEMENTED BY
MORE THAN ONE METHOD ( e.g GRAPHICS )
• OVERLOADING (type or number of variables)
• DYNAMIC BINDING
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO TESTING ISSUES
• POLYMORPHISM
– DO YOU TEST ONE VARIANT ?
– DO YOU TEST ALL VARIATIONS ?
– IF ALL, DO YOU TEST ALL VARIANTS AT ALL LEVELS
• UNIT
• “INTEGRATION” OR SYSTEM LEVEL
– REUSE DRIVERS AND STUBS
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
INHERITANCE STRUCTURES
BASE
SUBCLASS
SINGLE
BASEBASE
SUBCLASS
SUBCLASS
BASE
MULTIPLE MULTIPLE LEVELS
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
INHERITANCE
PARENT CLASS
MODIFIER
+
RESULT CLASS
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
INHERITANCE MODIFIERS
• NONE (ONLY INHERITED ATTRIBUTE)
• ADD NEW ATTRIBUTE(S)
• REDEFINE PARENT’S ATTRIBUTE(S)
• VIRTUAL ATTRIBUTE (THREADS IN JAVA)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO TESTING ISSUES
• INHERITANCE
– DO YOU COMPLETELY TEST ALL BASE CLASSES AND
THEIR SUB-CLASSES ?
– DO YOU COMPLETELY TEST ALL BASE CLASSES AND
ONLY TEST THE CHANGES OR MODIFICATIONS IN
THEIR SUB-CLASSES ?
– AT WHAT LEVELS DO YOU TEST?
– IN WHICH ORDER DO YOU TEST?
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
INHERITED TESTING
SCENARIO UNIT INTEGRATION
NONE X?
NEW X X?
REDEFINED X X
VIRTUAL (COMPLETED
BY SUBCLASS)
X X?
VIRTUAL ( NOT
COMPLETED)
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
OO TESTING METHODOLOGY
• JORGENSEN AND ERICKSEN PROPOSE 5 LEVELS
• A METHOD - UNIT TESTING
• MESSAGE QUIESCENCE - INTEGRATION
• EVENT QUIESCENCE - INTEGRATION
• THREAD TESTING -SYSTEM
• THREAD INTERACTION -SYSTEM
Chanderprabhu Jain College of Higher Studies & School of Law
Plot No. OCF, Sector A-8, Narela, New Delhi – 110040
(Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)

More Related Content

What's hot

What's hot (20)

Java notes | All Basics |
Java notes | All Basics |Java notes | All Basics |
Java notes | All Basics |
 
Server Side Technologies
Server Side TechnologiesServer Side Technologies
Server Side Technologies
 
This keyword in java
This keyword in javaThis keyword in java
This keyword in java
 
Interface
InterfaceInterface
Interface
 
OOP in C++
OOP in C++OOP in C++
OOP in C++
 
Advance Java Topics (J2EE)
Advance Java Topics (J2EE)Advance Java Topics (J2EE)
Advance Java Topics (J2EE)
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Iwot2017 teamwork in software development
Iwot2017 teamwork in software developmentIwot2017 teamwork in software development
Iwot2017 teamwork in software development
 
Operators in java
Operators in javaOperators in java
Operators in java
 
QSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and JitQSpiders - Jdk Jvm Jre and Jit
QSpiders - Jdk Jvm Jre and Jit
 
Full stack devlopment using django main ppt
Full stack devlopment using django main pptFull stack devlopment using django main ppt
Full stack devlopment using django main ppt
 
Java data types
Java data typesJava data types
Java data types
 
Java architecture
Java architectureJava architecture
Java architecture
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
Packages in java
Packages in javaPackages in java
Packages in java
 
Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
 
Command line-arguments-in-java-tutorial
Command line-arguments-in-java-tutorialCommand line-arguments-in-java-tutorial
Command line-arguments-in-java-tutorial
 
Nlp ambiguity presentation
Nlp ambiguity presentationNlp ambiguity presentation
Nlp ambiguity presentation
 

Similar to Software Testing Definitions and Approaches

Production Management & Total Quality Management
Production Management & Total Quality ManagementProduction Management & Total Quality Management
Production Management & Total Quality Managementcpjcollege
 
Front End Design Tool VB.Net BCA 205
Front End Design Tool VB.Net BCA 205Front End Design Tool VB.Net BCA 205
Front End Design Tool VB.Net BCA 205cpjcollege
 
FRONT END DESIGN TOOL VB.NET
FRONT END DESIGN TOOL VB.NET FRONT END DESIGN TOOL VB.NET
FRONT END DESIGN TOOL VB.NET cpjcollege
 
Business Statistics and Research Methodology
Business Statistics and Research MethodologyBusiness Statistics and Research Methodology
Business Statistics and Research Methodologycpjcollege
 
Linux environment
Linux environment Linux environment
Linux environment cpjcollege
 
Digital electronics
Digital electronicsDigital electronics
Digital electronicscpjcollege
 
Object oriented programming using BCA 209
Object oriented programming using BCA 209Object oriented programming using BCA 209
Object oriented programming using BCA 209cpjcollege
 
OPPS using C++
OPPS using C++ OPPS using C++
OPPS using C++ cpjcollege
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING cpjcollege
 
Management & Cost Accounting
Management & Cost AccountingManagement & Cost Accounting
Management & Cost Accountingcpjcollege
 
Technical communication
Technical communicationTechnical communication
Technical communicationcpjcollege
 
PROGRAMMING IN C
PROGRAMMING IN C PROGRAMMING IN C
PROGRAMMING IN C cpjcollege
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accountingcpjcollege
 
Trade union act 1926
Trade union act 1926Trade union act 1926
Trade union act 1926cpjcollege
 
Business Studies
Business StudiesBusiness Studies
Business Studiescpjcollege
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accountingcpjcollege
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of Managementcpjcollege
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of Managementcpjcollege
 

Similar to Software Testing Definitions and Approaches (20)

Production Management & Total Quality Management
Production Management & Total Quality ManagementProduction Management & Total Quality Management
Production Management & Total Quality Management
 
Front End Design Tool VB.Net BCA 205
Front End Design Tool VB.Net BCA 205Front End Design Tool VB.Net BCA 205
Front End Design Tool VB.Net BCA 205
 
FRONT END DESIGN TOOL VB.NET
FRONT END DESIGN TOOL VB.NET FRONT END DESIGN TOOL VB.NET
FRONT END DESIGN TOOL VB.NET
 
Business Statistics and Research Methodology
Business Statistics and Research MethodologyBusiness Statistics and Research Methodology
Business Statistics and Research Methodology
 
Linux environment
Linux environment Linux environment
Linux environment
 
Digital electronics
Digital electronicsDigital electronics
Digital electronics
 
Object oriented programming using BCA 209
Object oriented programming using BCA 209Object oriented programming using BCA 209
Object oriented programming using BCA 209
 
OPPS using C++
OPPS using C++ OPPS using C++
OPPS using C++
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Management & Cost Accounting
Management & Cost AccountingManagement & Cost Accounting
Management & Cost Accounting
 
Technical communication
Technical communicationTechnical communication
Technical communication
 
PROGRAMMING IN C
PROGRAMMING IN C PROGRAMMING IN C
PROGRAMMING IN C
 
RDBMS
RDBMSRDBMS
RDBMS
 
Normalization
NormalizationNormalization
Normalization
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accounting
 
Trade union act 1926
Trade union act 1926Trade union act 1926
Trade union act 1926
 
Business Studies
Business StudiesBusiness Studies
Business Studies
 
Cost Accounting
Cost AccountingCost Accounting
Cost Accounting
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of Management
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of Management
 

More from cpjcollege

Tax Law (LLB-403)
Tax Law (LLB-403)Tax Law (LLB-403)
Tax Law (LLB-403)cpjcollege
 
Law and Emerging Technology (LLB -405)
 Law and Emerging Technology (LLB -405) Law and Emerging Technology (LLB -405)
Law and Emerging Technology (LLB -405)cpjcollege
 
Law of Crimes-I ( LLB -205)
 Law of Crimes-I  ( LLB -205)  Law of Crimes-I  ( LLB -205)
Law of Crimes-I ( LLB -205) cpjcollege
 
Socio-Legal Dimensions of Gender (LLB-507 & 509 )
Socio-Legal Dimensions of Gender (LLB-507 & 509 )Socio-Legal Dimensions of Gender (LLB-507 & 509 )
Socio-Legal Dimensions of Gender (LLB-507 & 509 )cpjcollege
 
Family Law-I ( LLB -201)
Family Law-I  ( LLB -201) Family Law-I  ( LLB -201)
Family Law-I ( LLB -201) cpjcollege
 
Alternative Dispute Resolution (ADR) [LLB -309]
Alternative Dispute Resolution (ADR) [LLB -309] Alternative Dispute Resolution (ADR) [LLB -309]
Alternative Dispute Resolution (ADR) [LLB -309] cpjcollege
 
Law of Evidence (LLB-303)
Law of Evidence  (LLB-303) Law of Evidence  (LLB-303)
Law of Evidence (LLB-303) cpjcollege
 
Environmental Studies and Environmental Laws (: LLB -301)
Environmental Studies and Environmental Laws (: LLB -301)Environmental Studies and Environmental Laws (: LLB -301)
Environmental Studies and Environmental Laws (: LLB -301)cpjcollege
 
Code of Civil Procedure (LLB -307)
 Code of Civil Procedure (LLB -307) Code of Civil Procedure (LLB -307)
Code of Civil Procedure (LLB -307)cpjcollege
 
Constitutional Law-I (LLB -203)
 Constitutional Law-I (LLB -203) Constitutional Law-I (LLB -203)
Constitutional Law-I (LLB -203)cpjcollege
 
Women and Law [LLB 409 (c)]
Women and Law [LLB 409 (c)]Women and Law [LLB 409 (c)]
Women and Law [LLB 409 (c)]cpjcollege
 
Corporate Law ( LLB- 305)
Corporate Law ( LLB- 305)Corporate Law ( LLB- 305)
Corporate Law ( LLB- 305)cpjcollege
 
Human Rights Law ( LLB -407)
 Human Rights Law ( LLB -407) Human Rights Law ( LLB -407)
Human Rights Law ( LLB -407)cpjcollege
 
Labour Law-I (LLB 401)
 Labour Law-I (LLB 401) Labour Law-I (LLB 401)
Labour Law-I (LLB 401)cpjcollege
 
Legal Ethics and Court Craft (LLB 501)
 Legal Ethics and Court Craft (LLB 501) Legal Ethics and Court Craft (LLB 501)
Legal Ethics and Court Craft (LLB 501)cpjcollege
 
Political Science-II (BALLB- 209)
Political Science-II (BALLB- 209)Political Science-II (BALLB- 209)
Political Science-II (BALLB- 209)cpjcollege
 
Health Care Law ( LLB 507 & LLB 509 )
Health Care Law ( LLB 507 & LLB 509 )Health Care Law ( LLB 507 & LLB 509 )
Health Care Law ( LLB 507 & LLB 509 )cpjcollege
 
Land and Real Estate Laws (LLB-505)
Land and Real Estate Laws (LLB-505)Land and Real Estate Laws (LLB-505)
Land and Real Estate Laws (LLB-505)cpjcollege
 
Business Environment and Ethical Practices (BBA LLB 213 )
Business Environment and Ethical Practices (BBA LLB 213 )Business Environment and Ethical Practices (BBA LLB 213 )
Business Environment and Ethical Practices (BBA LLB 213 )cpjcollege
 
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )HUMAN RESOURCE MANAGEMENT (BBA LLB215 )
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )cpjcollege
 

More from cpjcollege (20)

Tax Law (LLB-403)
Tax Law (LLB-403)Tax Law (LLB-403)
Tax Law (LLB-403)
 
Law and Emerging Technology (LLB -405)
 Law and Emerging Technology (LLB -405) Law and Emerging Technology (LLB -405)
Law and Emerging Technology (LLB -405)
 
Law of Crimes-I ( LLB -205)
 Law of Crimes-I  ( LLB -205)  Law of Crimes-I  ( LLB -205)
Law of Crimes-I ( LLB -205)
 
Socio-Legal Dimensions of Gender (LLB-507 & 509 )
Socio-Legal Dimensions of Gender (LLB-507 & 509 )Socio-Legal Dimensions of Gender (LLB-507 & 509 )
Socio-Legal Dimensions of Gender (LLB-507 & 509 )
 
Family Law-I ( LLB -201)
Family Law-I  ( LLB -201) Family Law-I  ( LLB -201)
Family Law-I ( LLB -201)
 
Alternative Dispute Resolution (ADR) [LLB -309]
Alternative Dispute Resolution (ADR) [LLB -309] Alternative Dispute Resolution (ADR) [LLB -309]
Alternative Dispute Resolution (ADR) [LLB -309]
 
Law of Evidence (LLB-303)
Law of Evidence  (LLB-303) Law of Evidence  (LLB-303)
Law of Evidence (LLB-303)
 
Environmental Studies and Environmental Laws (: LLB -301)
Environmental Studies and Environmental Laws (: LLB -301)Environmental Studies and Environmental Laws (: LLB -301)
Environmental Studies and Environmental Laws (: LLB -301)
 
Code of Civil Procedure (LLB -307)
 Code of Civil Procedure (LLB -307) Code of Civil Procedure (LLB -307)
Code of Civil Procedure (LLB -307)
 
Constitutional Law-I (LLB -203)
 Constitutional Law-I (LLB -203) Constitutional Law-I (LLB -203)
Constitutional Law-I (LLB -203)
 
Women and Law [LLB 409 (c)]
Women and Law [LLB 409 (c)]Women and Law [LLB 409 (c)]
Women and Law [LLB 409 (c)]
 
Corporate Law ( LLB- 305)
Corporate Law ( LLB- 305)Corporate Law ( LLB- 305)
Corporate Law ( LLB- 305)
 
Human Rights Law ( LLB -407)
 Human Rights Law ( LLB -407) Human Rights Law ( LLB -407)
Human Rights Law ( LLB -407)
 
Labour Law-I (LLB 401)
 Labour Law-I (LLB 401) Labour Law-I (LLB 401)
Labour Law-I (LLB 401)
 
Legal Ethics and Court Craft (LLB 501)
 Legal Ethics and Court Craft (LLB 501) Legal Ethics and Court Craft (LLB 501)
Legal Ethics and Court Craft (LLB 501)
 
Political Science-II (BALLB- 209)
Political Science-II (BALLB- 209)Political Science-II (BALLB- 209)
Political Science-II (BALLB- 209)
 
Health Care Law ( LLB 507 & LLB 509 )
Health Care Law ( LLB 507 & LLB 509 )Health Care Law ( LLB 507 & LLB 509 )
Health Care Law ( LLB 507 & LLB 509 )
 
Land and Real Estate Laws (LLB-505)
Land and Real Estate Laws (LLB-505)Land and Real Estate Laws (LLB-505)
Land and Real Estate Laws (LLB-505)
 
Business Environment and Ethical Practices (BBA LLB 213 )
Business Environment and Ethical Practices (BBA LLB 213 )Business Environment and Ethical Practices (BBA LLB 213 )
Business Environment and Ethical Practices (BBA LLB 213 )
 
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )HUMAN RESOURCE MANAGEMENT (BBA LLB215 )
HUMAN RESOURCE MANAGEMENT (BBA LLB215 )
 

Recently uploaded

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 

Software Testing Definitions and Approaches

  • 1. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India) Software Testing BCA – V Paper Code 307
  • 2. 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. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 3. 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. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 4. “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] Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 5. Why Test? Q: If all software is released to customers with faults, why should we spend so much time, effort, and money on testing? Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 6. Black-Box / White-Box Testing • Black-box tests are driven by the program’s specification • White-box tests are driven by the program’s implementation Specification ProgramBlack- box tests White-box tests Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 7. Black Box Testing • Checks that the product conforms to specifications • Cannot determine how much code has been tested Program Omissions detected by black-box tests Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 8. White Box Testing • Allows tester to be sure every statement has been tested. • Difficult to discover missing functionality. Commissions detected by White-box testsProgram Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 9. Basic Definitions • Test case: specifies – Inputs + pre-test state of the software – Expected results (outputs an state) • Black-box testing: ignores the internal logic of the software, and looks at what happens at the interface (e.g., given this inputs, was the produced output correct?) • White-box testing: uses knowledge of the internal structure of the software – E.g., write tests to “cover” internal paths Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 10. Testing Approaches • Will look at a sample of approaches for testing • White-box testing – Control-flow-based testing – Data-flow-based testing • Black-box testing – Equivalence partitioning Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 11. Control-flow-based Testing • A traditional form of white-box testing • Step 1: From the source, extract a CFG • Step 2: Design test cases to cover certain elements of this graph – Nodes, edges, paths • Basic idea: given the CFG, define a coverage target and write test cases to achieve it Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 12. Statement Coverage • Traditional target: statement coverage – Need to write test cases that cover all nodes in the control flow graph • Intuition: code that has never been executed during testing may contain errors – Often this is the “low-probability” code Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 13. Branch Coverage • Target: write test cases that cover all branches of predicate nodes – True and false branches of each IF – The two branches corresponding to the condition of a loop – All alternatives in a SWITCH statement Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 14. Branch Coverage • Statement coverage does not imply branch coverage • Can you think of an example? • Motivation for branch coverage: experience shows that many errors occur in “decision making” (i.e., branching) – Plus, it subsumes statement coverage. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 15. Example • Same example as before • Test case #1: follows path 1- 2-exit • Test case #2: 1-2-3-4-5-7-8- 2-3-4-5-7-8-2-exit • Problem? 1 2 3 4 5 6 7 8 T F Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 16. Achieving Branch Coverage • For decades, branch coverage has been considered a necessary testing minimum • To achieve it: pick a set of start-to-end paths in the CFG, that cover all branches – Consider the current set of chosen paths – Try to add a new path that covers at least one edge that is not covered by the current paths • Then write test cases to execute these paths Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 17. Some Observations • It may be impossible to execute some of the chosen paths from start-to-end – Why? Can you think of an example? – Thus, branches should be executed as part of other chosen paths • There are many possible sets of paths that achieve branch coverage Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 18. Example if x ≤ y x= y T F if x == y z= 1 z= 0 FT Candidate start-to-end paths: (1) green path (2) red path % branch coverage? Problem? Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 19. Data-flow-based Testing • Basic idea: test the connections between variable definitions (“write”) and variable uses (“read”) • Starting point: variation of the control flow graph – Statement nodes represent one statement • Set Def(n) contains variables that are defined at node n (i.e., they are written) – The definitions at node nSet Use(n): variables that are read – The uses at node nStudies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 20. Remember Reaching Definitions • Definition A statement that may change the value of a variable (e.g., x = i+5) • A definition of a variable x at node k reaches node n if there is a path from k to n, clear of a definition of x. k n x = … … = x x = … Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 21. Def-use Pairs • A def-use pair (DU pair) for variable x is a pair of nodes (n1,n2) such that – x is in Def(n1) – The definition of x at n1 reaches n2 – x is in Use(n2) • In other words, the value that is assigned to x at n1 is used at n2 – Since the definition reaches n2, the value is not “killed” along some path n1...n2. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 22. Examples of Reaching Definitions Assume y is an input variable 1 s:= 0; 2 x:= 0; 3 while (x<y) { 4 x:=x+3; 5 y:=y+2; 6 if (x+y<10) 7 s:=s+x+y; else 8 s:=s+x-y; 1 2 3 4 5 6 7 8 9 1 0 What are the def-use pairs for s? What are the def-use pairs for x? Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 23. Data-flow-based Testing • Data-flow-based coverage target: DU pair coverage – Compute all DU pairs, and construct test cases that cover these pairs. HOW DO WE COMPUTE DU PAIRS? • Several coverage targets (criteria), with different relative strength • Motivation for data-flow-based testing coverage: see the effects of using the values produced by computations Focuses on the data, while control-flow- based testing focuses on the control Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 24. Finally, the targets (criteria): All-defs criterion • If variable x is in Def(n1), the all-defs criterion requires the test data to exercise at least one path free of definition of x which goes from n1 to some node n2 such that (n1,n2) is a DU pair for x. – Remember, x is defined at n1, – The definition of x at n1 reaches n2, and – x is used at n2 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 25. All-uses criterion • If variable x is in Def(n1), the all-uses criterion requires the test data to exercise at least one path free of definition of x which goes from n1 to each node n2 such that (n1,n2) is a DU pair for x. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 26. All-DU-paths criterion • If variable x is in Def(n1), the all-DU-paths criterion requires the test data to exercise each path free of definition of x which goes from n1 to each node n2 such that (n1,n2) is a DU pair for x. • So what is the relative strength of the three criteria: All-defs, All-uses, All-DU-paths? Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 27. All-defs, all-uses, all-du-paths Assume y is input 1 s:= 0; 2 x:= 0; 3 while (x<y) { 4 x:=x+3; 5 y:=y+2; 6 if (x+y<10) 7 s:=s+x+y; else 8 s:=s+x-y; } 1. Design test cases that cover all-uses Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 28. Black-box Testing • Unlike white-box testing, no knowledge about the internals of the code • Test cases are designed based on specifications Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 29. Equivalence Partitioning • Basic idea: consider input/output domains and partition them into equiv. classes – For different values from the same class, the software should behave equivalently • Use test values from each class – Example: if the range for input x is 2..5, there are three classes: “<2”, “between 2..5”, “5<” – Testing with values from different classes is more likely to uncover errors than testing with values from the same class Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 30. Equivalence Classes • Examples of equivalence classes – Input x in a certain range [a..b]: this defines three classes “x<a”, “a<=x<=b”, “b<x” – Input x is boolean: classes “true” and “false” – Some classes may represent invalid input • Choosing test values – Choose a typical value in the middle of the class(es) that represent valid input – Also choose values at the boundaries of all classes: e.g., if the range is [a..b], use a-1,a, a+1, b-1,b,b+1 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 31. Example • Suppose our spec says that the code accepts between 4 and 24 inputs, and each one is a 3-digit positive integer • One dimension: partition the number of inputs – Classes are “x<4”, “4<=x<=24”, “24<x” – Chosen values: 3,4,5, 14, 23,24,25 • Another dimension: partition the integer values – Classes are “x<100”, “100<=x<=999”, “999<x” – Chosen values: 99,100,101, 500, 998,999,1000 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 32. Another Example • Similar approach can be used for the output: exercise boundary values • Suppose that the spec says “the output is between 3 and 6 integers, each one in the range 1000-2500 • Try to design input that produces – 3 outputs with value 1000 – 3 outputs with value 2500 – 6 outputs with value 1000 – 6 outputs with value 2500 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 33. Example: Searching • Search for a value in an array – Return value is the index of some occurrence of the value, or -1 if the value does not occur in the array • One partition: size of the array – Since people often make errors for arrays of size 1, we decide to create a separate equivalence class Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 34. Example: Searching • Another partition: location of the value – Four classes: “first element”, “last element”, “middle element”, “not found” Array Value Output Empty 5 -1 [7] 7 0 [7] 2 -1 [1,6,4,7,2] 1 0 [1,6,4,7,2] 4 2 [1,6,4,7,2] 2 4 [1,6,4,7,2] 3 -1 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 35. Levels of Testing • Unit Testing • Integration Testing • Validation Testing – Regression Testing – Alpha Testing – Beta Testing • Acceptance Testing Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 36. Unit Testing • Algorithms and logic • Data structures (global and local) • Interfaces • Independent paths • Boundary conditions • Error handling Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 37. Why Integration Testing Is Necessary • One module can have an adverse effect on another • Subfunctions, when combined, may not produce the desired major function • Individually acceptable imprecision in calculations may be magnified to unacceptable levels Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 38. Why Integration Testing Is Necessary (cont’d) • Interfacing errors not detected in unit testing may appear • Timing problems (in real-time systems) are not detectable by unit testing • Resource contention problems are not detectable by unit testing Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 39. Top-Down Integration 1. The main control module is used as a driver, and stubs are substituted for all modules directly subordinate to the main module. 2. Depending on the integration approach selected (depth or breadth first), subordinate stubs are replaced by modules one at a time. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 40. Top-Down Integration (cont’d) 3. Tests are run as each individual module is integrated. 4. On the successful completion of a set of tests, another stub is replaced with a real module 5. Regression testing is performed to ensure that errors have not developed as result of integrating new modules Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 41. Problems with Top-Down Integration • Many times, calculations are performed in the modules at the bottom of the hierarchy • Stubs typically do not pass data up to the higher modules • Delaying testing until lower-level modules are ready usually results in integrating many modules at the same time rather than one at a time • Developing stubs that can pass data up is almost as much work as developing the actual module Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 42. Bottom-Up Integration • Integration begins with the lowest-level modules, which are combined into clusters, or builds, that perform a specific software subfunction • Drivers (control programs developed as stubs) are written to coordinate test case input and output • The cluster is tested • Drivers are removed and clusters are combined moving upward in the program structure Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 43. Problems with Bottom-Up Integration • The whole program does not exist until the last module is integrated • Timing and resource contention problems are not found until late in the process Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 44. Validation Testing • Determine if the software meets all of the requirements defined in the SRS • Having written requirements is essential • Regression testing is performed to determine if the software still meets all of its requirements in light of changes and modifications to the software • Regression testing involves selectively repeating existing validation tests, not developing new tests Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 45. Alpha and Beta Testing • It’s best to provide customers with an outline of the things that you would like them to focus on and specific test scenarios for them to execute. • Provide with customers who are actively involved with a commitment to fix defects that they discover. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 46. Acceptance Testing • Similar to validation testing except that customers are present or directly involved. • Usually the tests are developed by the customer Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 47. Test Methods • White box or glass box testing • Black box testing • Top-down and bottom-up for performing incremental integration • ALAC (Act-like-a-customer) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 48. Validation Readiness Review • During informal validation developers can make any changes needed in order to comply with the SRS. • During informal validation QA runs tests and makes changes as necessary in order for tests to comply with the SRS. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 49. Formal Validation • The same tests that were run during informal validation are executed again and the results recorded. • Software Problem Reports (SPRs) are submitted for each test that fails. • SPR tracking is performed and includes the status of all SPRs ( i.e., open, fixed, verified, deferred, not a bug) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 50. Test Planning • The Test Plan – defines the scope of the work to be performed • The Test Procedure – a container document that holds all of the individual tests (test scripts) that are to be executed • The Test Report – documents what occurred when the test scripts were run Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 51. Test Plan • Questions to be answered: – How many tests are needed? – How long will it take to develop those tests? – How long will it take to execute those tests? • Topics to be addressed: – Test estimation – Test development and informal validation – Validation readiness review and formal validation – Test completion criteria Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 52. Test Estimation • Number of test cases required is based on: – Testing all functions and features in the SRS – Including an appropriate number of ALAC (Act Like A Customer) tests including: • Do it wrong • Use wrong or illegal combination of inputs • Don’t do enough • Do nothing • Do too much – Achieving some test coverage goal – Achieving a software reliability goal Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 53. Considerations in Test Estimation • Test Complexity – It is better to have many small tests that a few large ones. • Different Platforms – Does testing need to be modified for different platforms, operating systems, etc. • Automated or Manual Tests – Will automated tests be developed? Automated tests take more time to create but do not require human intervention to run. Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 54. Estimating Tests Required SRS Reference Estimated Number of Tests Required Notes 4.1.1 3 2 positive and 1 negative test 4.1.2 2 2 automated tests 4.1.3 4 4 manual tests 4.1.4 5 1 boundary condition, 2 error conditions, 2 usability tests … Total 165 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 55. Test Report • Completed copy of each test script with evidence that it was executed (i.e., dated with the signature of the person who ran the test) • Copy of each SPR showing resolution • List of open or unresolved SPRs • Identification of SPRs found in each baseline along with total number of SPRs in each baseline • Regression tests executed for each software baseline Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 56. OBJECT ORIENTED TESTING SYSTEM TESTING UNIT TESTING INTEGRATION TESTING INHERITANCE POLYMORPHISM ENCAPSULATION Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 57. TRADITIONAL DEVELOPMENT & TESTING (WATERFALL LIFE CYCLE) • REQUIREMENTS SPEC SYSTEM TESTING • PRELIMINARY DESIGN INTEGRATION TESTING – FUNCTIONAL – DECOMPOSITION • DETAILED DESIGN UNIT TESTING Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 58. TRADITIONAL TESTING • SYSTEM – VERIFY SW SATISFIES ALL SW REQRS • INTEGRATION – BASED ON STRUCTURE OF DESIGN – TOP DOWN OR BOTTOM UP APPROACH • UNIT – ENCAPSULATES FUNCTIONALITY Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 59. OO DEVELOPMENT & TESTING • DEVELOPMENT BASED ON BEHAVIOUR • COMPOSITION • TYPICALLY RAPID PROTOTYPING • INCREMENTAL APPROACH • 3 TRADITIONAL TESTING LEVELS ARE NOT AS CLEARLY DEFINED Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 60. OBJECT ORIENTED TESTING • SYSTEM – SAME AS TRADITIONAL – STILL BASED ON REQRS SPEC • UNIT – TWO COMMON STRUCTURES USED • METHOD* • CLASS – SAME AS TRADITIONAL(DRIVERS & STUBS) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 61. METHOD 2 METHOD 1 METHOD METHOD METHOD METHOD METHOD OBJECT CLASS A B C D E F Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 62. METHOD 2 METHOD 1 METHOD METHOD METHOD METHOD METHOD OBJECT CLASS A B C D E F Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 63. OO INTEGRATION TESTING • MAIN PROGRAM IS MINIMIZED • MOST COMPLICATED PART OF OO TESTING • TESTING BASED ON COMPOSITION IN BOTTOM UP APPROACH • USE OF CLUSTERS • ORD - CLASS DEPENDENCIES • BBD OR DIRECTED GRAPHS - SHOWS METHOD DEPENDENCIES Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 64. meth1 meth3meth2 Class 1 A B OUTPUT PORT EVENT A meth1 meth3 meth2 meth2 meth1 B OUTPUT PORT EVENT Class 2 Class 3 MM-Path 1 2 3 Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 65. OO CONCEPTS/EFFECTS ON TESTING • ENCAPSULATION • POLYMORPHISM • INHERITANCE Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 66. ENCAPSULATION • CLASS STRUCTURE • INTERFACE DEFINED BY PUBLIC METHODS • BEHAVIOR DEFINED BY METHODS THAT OPERATE ON ITS INSTANCE DATA (IN CONVENTIONAL SEPARATE) • HELPS ENFORCE INFO HIDING Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 67. ENCAPSULATION TESTING ISSUES • MINIMIZES RIPPLE EFFECT (AT THE UNIT LEVEL) OF MAKING A CHANGE • HIGHLY DELOCALIZED – CHANGE COULD RESULT IN SIGNIFICANT REGRESSION TESTING • ORDER OF TESTING IS IMPORTANT (CAN REDUCE TESTING EFFORT) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 68. METHOD METHOD CLASS A CLASS B CLASS C METHOD USES USES Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 69. POLYMORPHISM • AN ATTRIBUTE MAY HAVE MORE THAN ONE SET OF VALUES • AN OPERATION MAY BE IMPLEMENTED BY MORE THAN ONE METHOD ( e.g GRAPHICS ) • OVERLOADING (type or number of variables) • DYNAMIC BINDING Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 70. OO TESTING ISSUES • POLYMORPHISM – DO YOU TEST ONE VARIANT ? – DO YOU TEST ALL VARIATIONS ? – IF ALL, DO YOU TEST ALL VARIANTS AT ALL LEVELS • UNIT • “INTEGRATION” OR SYSTEM LEVEL – REUSE DRIVERS AND STUBS Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 71. INHERITANCE STRUCTURES BASE SUBCLASS SINGLE BASEBASE SUBCLASS SUBCLASS BASE MULTIPLE MULTIPLE LEVELS Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 72. INHERITANCE PARENT CLASS MODIFIER + RESULT CLASS Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 73. INHERITANCE MODIFIERS • NONE (ONLY INHERITED ATTRIBUTE) • ADD NEW ATTRIBUTE(S) • REDEFINE PARENT’S ATTRIBUTE(S) • VIRTUAL ATTRIBUTE (THREADS IN JAVA) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 74. OO TESTING ISSUES • INHERITANCE – DO YOU COMPLETELY TEST ALL BASE CLASSES AND THEIR SUB-CLASSES ? – DO YOU COMPLETELY TEST ALL BASE CLASSES AND ONLY TEST THE CHANGES OR MODIFICATIONS IN THEIR SUB-CLASSES ? – AT WHAT LEVELS DO YOU TEST? – IN WHICH ORDER DO YOU TEST? Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 75. INHERITED TESTING SCENARIO UNIT INTEGRATION NONE X? NEW X X? REDEFINED X X VIRTUAL (COMPLETED BY SUBCLASS) X X? VIRTUAL ( NOT COMPLETED) Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)
  • 76. OO TESTING METHODOLOGY • JORGENSEN AND ERICKSEN PROPOSE 5 LEVELS • A METHOD - UNIT TESTING • MESSAGE QUIESCENCE - INTEGRATION • EVENT QUIESCENCE - INTEGRATION • THREAD TESTING -SYSTEM • THREAD INTERACTION -SYSTEM Chanderprabhu Jain College of Higher Studies & School of Law Plot No. OCF, Sector A-8, Narela, New Delhi – 110040 (Affiliated to Guru Gobind Singh Indraprastha University and Approved by Govt of NCT of Delhi & Bar Council of India)