Professional Documents
Culture Documents
Head Office: UG 304 Dreams The Mall Bhandup(W) Contact No: 9821257630
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Unit 3
• It is a process of taking a module & testing it in isolation from the rest of the software
& comparing the actual results with the result defined in the specifications & design of
module.
• A unit can be
• a. Single procedure
b. A Function
c. A body of code that implements a single function
d. The smallest body of code that can be compiled and executed by itself.
• Scaffolding:
• The tester will have to write Test case to satisfy Boundary value considering values
from Valid Region to Invalid Region and Values which define exact boundary.
Normal boundary value concerned with valid values of the input variables. One or
more variables and 5 values (4 extreme and 1 nominal).
In the above example there are two variables and each variable having 5 values
Example for variable X:
• Min value= 10
Min value +1= 11
Max value=100
Max value-1 = 99
Normal value = Min + max/2
=10 + 100/2
= 55
• Same will be calculated for variable Y and we will get value 155.
• In boundary, Extreme values are not taken. Only normal values are
taken for test cases.
• We have to write test cases by having 2 variables. One variable will be holding
extreme values and other variable will be holding normal values and conducting
different
test cases and feeding into the input engine will estimate whether these variables r
output values lying inside or outside the Domain.
•
Example to calculate Boundary Value Testing
Extreme Value: Min Min+1 Max-1 Max
• Normal values: Min+ Max/2
No. of Test Cases: 4x + 1 where x is no. of variable
4(2+1)
8+1=9
So total 9 test cases will be designed for Boundary value test.
TC1 = (10, 155)
TC2 = (11, 155)
• TC3 = (55,155)TC4 = (99, 155)
TC5 = (100,155)
ТС6 = (110, 55)
TC7 = (111, 55)
TC8 = (199, 55)
TC9 = (200, 55)
In robustness testing, Software is tested insuch a way that some of the invalid valuesare
testedas inputs.
6(n+1) OR 7+6(N-1)
6(2+1) 7+6(2-1)
In worst case boundary value testing need to make combination of each value of one
variable with each value of other variable (Cartesian Product )
In worst case testing, need to perform Cartesian product i.e. each value of one variable
with each value of other variable.
So, according to above example we have 2 variables and each having 5 values.
Example:
TC1= (30, 60)
TC2 = (30, 61)
TC3= (30, 85)
TC4= (30, 109)
TC5 = (30, 110)
.
.
.
TC25 = (60,110)
If more than 2 variables are there then need to apply formula for test case
Formula for more than 2 variables is 5(N). Where N is number of variables.
Special Value Testing is executed by expert tester who goes through each and every
aspect of the program and uses their domain knowledge to devise test cases. This is the
highly popular functional testing which provides accurate results. Special value testing is
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 10
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Ad-hoc in nature means no guidelines is used by the tester other than their “Best
Engineering practice”
Age Limit
1) 0-15
2) 16-17
3) 18-54
4) 55-99
int myAbs(int x) {
if (x>0) {
return x;
}
else {
return x;// bug: should be ‘-x’
}
}
Random value for this function could be {123. 36, -35.48.o}. Only the value '-35’
triggers the bug.
Q. Equivalence Classes:
In Equivalence class technique the input and output domain is divided into finite
number of equivalence classes.
In this technique where input values required for testing are grouped into two
classes.
Input and/or output variables have well defined intervals within the boundaries
If function F with two variables (X1, X2) then
The robust part is consideration of invalid values and strong part refers to the
multiple fault assumptions. This form of testing produces test cases for all valid and
invalid elements of the Cartesian product of all the equivalence classes.
Decision Table-based:
To deal with large number of combinations or conditions it would be better to divide them
into subsets and to deal with subset one at a time.
Once you come to know or identified all the aspects which need to be combinedthen you
put them into a table listing all the combinations of ‘true and False’ or ‘yes and no’.
1) The part to the left of the bold vertical line is the stub portion.
2) The right is the entry portion.
3) The part above the bold horizontal line is the condition portion.
4) The below is the action portion.
The stub is divided into two parts, Condition stub for condition entries and action
stub for action entries. Rules indicate which action.
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 16
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
In decision table when conditions c1, c2 and c3 are all true, actions al
and a2 occur.
When c1 and c2 are both true and c3 is false, then action a1 and a3 occur.
The 'don't care’ has two interpretations: The condition is irrelevant, or the
condition does not apply sometimes people enter "N/A" for latter interpretation.
When we have binary condition (true/false, yes/no, o/1), the condition portion of a
decision table is a truth table (from propositional logic). This structure guarantees that
we consider every possible combination of condition value.
To identity test cases with decision tables, we interpret conditions as inputs and actions
as outputs.
3 variables has been taken as input (a, b & c). On these 3 variables conditions will be
applied to check the output as per action taken on the conditions.
Conditions:
Condition will be applied on variables a,b,c.
Actions:
It's not a Triangle
It's a Triangle
It's a Triangle but size of three sides is different than it is a Scalene.
If it is a Triangle but size of Two side is equal than it should message it is a
Isosceles.
If all sides of triangle is equal than it should message it is an Equilateral
Otherwise if should message impossible when given condition is not satisfied.
In this testing technique, test cases that logically relate causes (inputs) to Effects
(outputs) to produce test cases.
A "Cause" stands for an input condition that state aboutan internal change in the system.
Decision tables do not scale up very well (a limited entry table with n conditions
has 2n rules). There are several ways to deal with this, use extended e
decision tables.
Path Testing
Path Testing is a structural testing method based on the source code or algorithm
and NOT based on the specification.
Path testing is an approach to testing where you ensure that every path through a
program has been executed at least once.
There are no defects that exist in the system other than those that affect control
flow.
Program Graphs:
IF i and j are nodes in the program graph. An edge exists from I to node j if and onlyif the
statement fragment corresponding to node j can be executed immediately after
the statement fragment corresponding to node i
DD Paths:
The best-know form of code-based testing is based on a construct known as a
decision to decision path (DD- path) (Miller, 1977).
The name refers to a sequence of statements, In Miller's words, begins with the
"outway" of a decision statement an
ends with the "inway" of the next decision statement.
The DD-path concepts is known as a" linear code sequence and jump" and is
abbreviated by the acronym LCSAJ.
If the first node on a DD-path is traversed, then all other nodes on that path will
also be traversed.
Definition:
Case 1 and 2 establish the unique source and sink nodes of the program graph of
a structured program as initial and final DD-paths.
Case 3 deals with complex nodes; it assures that no node is contained in more
than one DD-path.
Case 4 is needed for "short branches"; it also preserves the one-fragment, one
' Case 5 is the "normal case," in which a DD-path is a single entry, single-exitsequence
of nodes (a chain).
DD-path graph is the directed graph in which nodes are DD paths of its program
graphs, and edges represent control flow between successors DD-path.
·
Node 4 is a case 1 DD-path, we will call it "first" Node 23 is a case 2 DD-path and
we will call it "last".
Node 5 through 8 are case 5 DD-paths. Node 8 is the last node in this DD-path
because it is the last node that preserves the 2-connected property of the chain.
Basis Path Testing is a type of Structural Testing (White Box Testing) used
designing test cases to determine all possible paths of execution at least once.
V(G) = E-N+2
Where
E-Number of edges
N-Number of Nodes
V(G)=P+ 1
V(G) 2+1= 3
Step 3:
Calculate the basis set of independent paths:
Path 1: 1,2,3,5,6,7
Path 2: 1,2,4,5,6,7
Path 3: 1,6,7
Step 4: Prepare Test cases for each path
Data flow testing refers to forms of structural testing that focus on the points
which variables receive values and the points at which these values are used (or
referenced).
Two mainline forms of data flow testing: one provides a set of basic
definitions and a unifying structure of test coverage metrics, while the other is based on
a concept called a "program slice."
Both start with a program graph, both move back in the direction of functional
testing.
Both of these methods are difficult to perform manually.
Few commercial tools exist to make life easier for the data flow and slicing testers.
On the positive side, both techniques are helpful for coding and debugging.
Most programs deliver functionality in terms of data. Variables that represent data
somehow receive values, and these values are used to compute values for other
variables.
Early data flow analyses often centered on a set of faults that are now
known as define/reference anomalies:
1.Define/use Testing:
The following definitions refer to a program P that has a program graph G(P) and a
set of program variables v.
We also disallow edges from a node to itself. Paths, sub-paths. The set of all paths inP
is PATHS(P)
Definition
Node n e G(F) is a defining node of the variable v ㅌ V, written as DEF(v, n), if
and only if the value of variable vis defined as the statement fragment corresponding to
node n.
Node n e G(P) is a usage node of the variable v E V, written as USECv, n), if and
only if the value of the variable v is used as the statement fragment corresponding to
node n.
A usage node USE(V, n) is a predicate use (denoted as P-use) if and only if the statement n
(denoted C-use).
Mn The T
It creates various subset(called slice) of a program with respect to its variables and their
selected locations in the program.
It simplify the process of testing of the program. Hence slices are simpler than the
original program
A program slice is a set of program statements that contributes to, or affects the value
of, a variable at some point in a program.
Slicing criteria:
S(v,n); where v is variable and n is number of line where you want to check the
variable.
I want to check the variable 'c'. So, we need to slice the variable 'c' to check the
line number where it is and where it is used.
Verification:
Advantages of Verification:
• Verification ensures that the work product is following the processes correctly
defined by organization or customer.
It can find the defects & it’s root cause
• Cost of finding & fixing defects is less.
• Disadvantages of Verification:
• It cannot show whether the developed software is correct or not. Rather, it shows
whether the processes have been followed or not.
• Actual working software may not be accessed by verification as it does not cover
a kind of execution of a work product.
Validation:
Advantages of Validation
• Black-box testing approach is use for system, integration & acceptance testing
Disadvantages of Validation:
Q. Methods of Verification.
Self-Review:
Advantages of self-review:
Disadvantages:
Developer will be more focus on coding rather than reviewing the code developed by
them
Peer review:
In this review, author & reviewer meet together & give review jointly
In this review, author informs reviewer that software is ready for review & reviewer
reviews it according to his time availability & send results to author
Advantages:
Disadvantages:
Peer might fix defects but won’t show mistake of his friends
Superior Review:
Superior such as team leader or module leader will review the product made by sub-
ordinates
Superior may have better understanding than author about requirements & design
Walk-Through:
Advantages:
Disadvantages:
Inspection
It involves domain expert & absence of author
Advantages:
Disadvantages:
Expert may give his judgement but he might be unaware about need of the customer.
These are some entities may change as per specific circumstance, organisation and
customer requirements.
Requirement review:
Design review:
Requirements
Test plan
Test scenario
Test Cases
Test Results
Walkthrough, Peer Review
In-process review
Milestone review
Post-implementation review
In-process review:
Work product & metric undergoing review are created & submitted to the stakeholder in
advanced
Issues like hardware availability, software availability & training are identified & actions
are implemented
2. Milestone review
Periodic Review:
Post-Implementation Review:
Process:
Test-readiness review:
It is conducted by test managers or test leads with the project manager to ensure that
the product under development is ready for testing
It is carried out at every stage of development (Unit testing, integration testing, system
testing, interface testing, system testing acceptance testing, etc.)
Prerequisites Training:
Prerequisites such as the database, operating system, etc. may be needed during the
software installation.
If it is specified in the requirement statement that installation must check for the
availability of such prerequisites, then it must be tested for these requirements.
Updation Testing:
During software installation, it is expected that the system should check whether the
same software already exists there or not.
Ifthe existing version of the software is older than the one being installed, then it also
prompts for a repair or new installation.
Un-installation testing:
Test-completion review:
It indicates the development team whether a product can go to the next phase or it
needs any repairing before it can be declared successful.
Statement coverage
It is a white box testing technique, which involves the execution of all the statements at
least once in the source code.
It is a metric, which is used to calculate and measure the number of statements in the
source code which have been executed.
The main drawback of this technique is that we cannot test the false condition in it.
Example:
Read A
Read B
if A>B
Print “A is greater than B”
else
Print "B is greater than A"
end if
Set1: If A =5, B =2
No of statements Executed: 5
Total no of statements in the source code: 7
Statement coverage =5/7*100 = 71.00 %
Set1:If A =2, B =5
No of statements Executed: 6
Total no of statements in the source code: 7
Statement coverage =6/7*100 = 85.20 %
Path Coverage:
The way that path coverage testing works is that the testers must look at each possible
scenario, so that all lines of code are covered.
In a very basic example, consider a code function that takes in a variable "x" and returns
one of two results: if x is greater than 5, the program will return the result "A" and if x is
less than or equal to 5, the program will return the result "B."
The code for the program would look something like this:
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 35
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
input x
if x > 5 then
return A
else return B
In order for path coverage testing to effectively "cover all paths," the two test cases must
be run, with x greater than 5 and x less than or equal to 5.
Experts generally consider path coverage testing to be a type of white box testing, which
actually inspects the internal code of a program, rather just relying on external inputs
and strategies that are considered black box testing, which do not consider internal
code.
Decision Coverage:
Decision coverage or Branch coverage is a testing method, which aims to ensure that
each one of the possible branch from each decision point is executed at least once and
thereby ensuring that all reachable code is executed.
That is, every decision is taken each way, true and false. It helps in validating all the
branches in the code making sure that no branch leads to abnormal behaviour of the
application
Read A
Read B
IF A+B >10 THEN
Print"A+B is Large"
ENDIF
IfA>5 THEN
Print"A Large"
ENDIF
to calculate BranchCoverage, one has to find out the minimum number of paths which
will ensure that all the edges are covered.Inthiscase there isno single path which will
ensure coverage of all the edges at once.The aim is to cover all possible true/false
decisions.
(1)1A-2C-3D-E-4G-5H
(2)1A-2B-E-4F
HenceDecisionorBranchCoverageis2.
Q. Coverage in Validation:
It is also termed as 'prioritization technique where primary parts of the system are tested
fully so that the system should not have defects under normal circumstances.
Requirement Coverage:
They can be put in different classes such a must be, 'should be', and 'could be' and are
prioritized accordingly.
All high-priority requirements expressed as 'must' and lower level priority requirements
expressed as should be' and could be'.
Priority of requirement
P1(Must)
P2 (Should be)
P3(Could be)
Coverage offered
100%
50%
25%
Priority of Functionalities
P1(Must)
P2 (Should be)
P3(Could be)
Coverage
100%
50%
25%
Feature coverage:
Feature may have different feature of doing things, and each of them is functionality for
the application.
Priority of Features
P1(Must)
P2 (Should be)
P3(Could be)
Coverage offered
100%
50%
25%
Q. Acceptance testing.
Here are some predefined methodologies, condition and test cases will be used for
acceptance testing.
Alpha Testing:
Beta Testing:
Gamma Testing:
Gamma check is performed when the application is ready for release to the specified
requirements
This is performed directly without going throughall the testing activities at home.
The application is given to few people for usingit in production, and feedback is obtained
from them.
Q. Levels of Validations:
Unit Testing:
Integration Testing:
Integration testing involves testing of many units bycombining them together to form a
sub-module or module.
If designing of stubs/drivers are needed to execute integrated parts,then in such
cases integration is done by developer.
And if integration is executed independently, then integration is done by tester.
Integration testing mainly refers to detail design or low-level design.
Interface Testing:
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 39
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Interface testing involves testing of software with
environment factors (such as database and operating system), where
application is supposed to work.
System Testing:
System testing involves end-to-end testing of a system to find the behaviour of system
with respect to expectations
System testing is actually a set of processes which may include functionality, user
interface, performance and security testing.
At the requirement phase, during system testing & acceptance testing, thesystem tester
and users confirm that requirements have been really met or not.
Design phase is associated with interface testing which covers design specification
testing as well as structural testing
Program-level designs are associated with integration testing.
Requirement Analysis:
It is not important how the system is implemented but important is what the system is
supposed to do.
Here, the product requirements is understood from customer's perspective.
System Design:
The system design will have the understanding detailing the complete hardware and
communication setup for the product development.
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 40
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Architectural Design:
In this phase, the data transfer and communication between the internal modules and
other system is clearly understood
Module Design:
Coding phase:
Unit Testing:
Unit testing is a white box testing technique, where code is written which invokes a
method (or any other piece of code) to testwhether the code fragment is giving the
expected output or not
Integration Testing:
Integration testing is a technique where tested modules are integrated and tested
whether
Integrated modules are giving the expected results.
System Testing:
In this phase all the system test cases, functional test cases andnon-functional test
cases are executed.
In other words, the actual and full fledge testing of the application takes place here.
Defects are logged and tracked for itsclosure
Acceptance Testing:
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 41
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Acceptance testing is done to validate that business requirements are met in the user
environment.
Q. VV Model:
Various Activities of VV Model associated with each phase of development life cycle.
Requirements:
Requirements are obtained from customer using techniquewith the intention to find if
there is any gap between user requirement and requirement definitions
Requirement Verification:
Defects must becorrected before going to the next stage of development life cycle
Requirement Validation:
First stage of validation is writing complete use-case
Design:
Design may include high-level design or architectural design, and low-level design or
detail design
Design verification:
Project team along withdesigner may walkthrough the design to find the completeness
and give comments.
Design Validation:
The first stage of Validation happens when data low diagram canbe created by referring
to the design document.
Coding:
Code verification:
Peer review helps in identification of errors with respects to coding standards, indenting
standards, commenting standards, and variable declaration.
Validation of coding is done through unit testing where individual units are tested
separately.
Adequate:
Constraints & Assumptions must be defined & documented with possible solutions
Clear/Unambiguous:
For ex: if user wants username textbox should contain at least 8 characters then he
should specify that appropriate message should be generated if user don’t enter
minimum 8 characters
Suggest your friends to join Surya InfoEdge. TY BSCIT @ 25000
Practical oriented teaching and easy notes prepare for best results.Page No: 43
Prof: Zeeshan Sir.. Surya InfoEdge
Dawn of your life
TYBSCIT Admission Starts From 5th May 2019
Measurable:
Requirement can be specified within boundaries like minimum & maximum so that it can
be verified
Feasible:
Two requirements must not specify anything which is conflicting with each other
Generally, requirements are prioritized.
Surya InfoEdge
King of Certification (KOC)
TYBSCIT @ 25000
TYBSCIT starts from 1st May 2019