Software Testing
• Software testing is a process of executing a program with the intention of
nding bugs or fault in the code.
Objective of testing:-
• It test whether software is build accordance with the user requirement or not.
• It guarantee to give good quality product.
Principles of testing:-
• Testing should be based on SRS and must perform both functional and non-
functional testing.
• Testing must start after a proper test plan.
• Testing time and resource cost is limited.
• Testing must be done by third party and assign best person for testing.
fi
Types of Testing
• Unit Testing:- It is the rst level of testing that involve testing individual units
of code to ensure they work correctly.
• It is belongs to both white box and black box testing.
• Purpose:- It check whether each unit of code perform its function properly
and to catch any fault in development process .It will check internal and
external logic of module.
• Integration testing:- It is type of testing in which individual software modules
are combined and tested as a group.
• Purpose:- This testing test the module interface where we verify the
functionality, performance, reliability between the modules that interact with
each other.
• It is time consuming and costly testing due to complexity of inter module
dependencies.
fi
Types of integration testing
Integration testing
Incremental integration testing Non-incremental integration testing
Big-Bang testing
Top-down Bottom-up Hybrid /Sandwich
• Big-bag testing:- It is a type of testing where all modules are integrated
simultaneously and then tested as a complete system.
• It is non-incremental integration testing.
• This testing is used where software are very small.
• It support software where coupling is low and cohesion is high.
Incremental testing types:-
• Top-down integration testing:- It is the testing where the top -level module
are tested rst and then we proceed to lower-level modules.This testing
continue until all modules are integrated and whole software or system has
been tested.
• Stub modules are used to simulate the e ect of lower- level modules that has
not yet been integrated and are called by the routines under test.
fi
ff
• Bottom-up integration testing:- It is the testing where lower-level modules
are tested rst and then integrated and tested with the higher-level modules.
• Driver are used to simulate the e ect of higher-level module.
• Hybrid integration testing/sandwich testing :- The combination of top-
down and bottom-up integration testing is called hybrid testing/sandwich
testing
• In hybrid integration testing the upper-level module use top-down integration
and the lower-level module use bottom-up integration and stubs and drivers
are used to replace the missing modules in the middle layers.
fi
ff
System testing:-
• It is level of testing where the complete and integrated software system as a
whole is tested and testing should be done according to SRS.
• It is the nal stage of testing and aiming to catch the e ect that might have
slipped in the previous stages of testing.
• It is performed in an environment that resemble the real world or production
environment and is performed by independent tester.
• This testing include functional testing, performance testing, security
testing ,compatibility testing.
• It is done by the software developer.
fi
ff
User acceptance testing(UAT):-
• It is the nal testing phase before software deployment, aiming to check if
the system meets organisation requirements and is t for use.
• It is done by clients and should be test in real world scenario.
• It focus on technical and non-technical aspects or feedbacks and should
document or note down all outcomes, feedback etc.
• Before signing o to user it check is it meets all user requirements if yes than
software is ready to release and use.
fi
ff
fi
• Regression testing :- It is a type of testing that ensure that previously
developed and tested software still functions as expected after making any
changes to that software such as updates or bug x.
• Purpose or goal is to ensure that changes have not disrupted any existing
functionality.
• Unit testing, partial regression testing and complete regression testing.
• Stress testing:- This testing evaluate software performance when it is
stressed for short period of time.
• It is also known as endurance testing.
fi
• White box testing(veri cation):- This testing check how actual functionality is
performed and we go inside a system.
• This testing deals with”Are we making the product right”.
• Tools required are sqlmap ,Nunit ,Cpp unit,Fiddler etc.
White box testing techniques:-
1.Statement coverage/Path coverage :-In this each line of code is tested.
2.Condition coverage:-All individual conditions must be checked.
3. Loop testing:-All loop must be checked.
fi
• Black box testing(validation):- This testing treat system as a whole and
check system according to user requirements.
• This testing deals with “Are we making the right product”.
• This deals with checking o/p for every input.
• Tools used are Appium , Selenium , Microsoft Coded UI etc.
Black box testing techniques
• Equivalence partitioning:-Instead of using each and every input value, use
any one value from the group to test outcomes.
• Boundary value analysis:-It test ,boundary values are those that contain the
upper and lower limit of a variable.
• Requirement based testing:- It includes validating the requirements given in
the SRS.
Mutation Testing
• It is a type of software testing that is performed to design new software tests
and also evaluate the quality of already existing software tests.
• It is related to modify a program in small ways.
• It was proposed by Richard Lipton in 1971.
• Highly used for languages Java and XML.
• It is white box testing ,tools used for mutation testing are Judy,Jester,Jumble
etc.
Original program Compare results of both the programs.
Output
Copy or Mutant program
Objective of mutation testing
• Used to identify piece of code that are not tested properly.
• Used to discover new kinds of errors or bugs.
• Used to assess the quality of the test cases.
Types of mutation testing:-
• Value mutation:-In this type of testing the values are changed to detect error
in the program ,basically small value change into large or large into small.
• Decision mutation:-In this testing logical or arithmetic operators are changed
to detect error in the program.
• Statement mutation:-In this testing statement is deleted or replaced by
some other statement.
Di erence between Static and Dynamic testing
Static testing Dynamic testing
• It is performed to check the defects It is performed to analyze the dynamic
in the software without actually
behaviour of the code
executing the code.
The objective is prevent defect. The objective is to nd and x defects.
Testing techniques are:-informal
Testing techniques are:-white box
reviews,walkthroughs,technical
testing, black box testing
reviews, code reviews, inspection
It is performed at the early stage of It is performed at the later stage of
software development software development
It is less costly It is highly costly
It is a veri cation process It is a validation process
fi
ff
fi
fi
• Alpha testing:- Testing done on developer side,usually performed with
arti cial test scenario.
• Beta testing:- Testing done at customer side ,usually performed with real
time .
fi