Module 5
Module 5
TESTING
Prepared by:
Prof. Sherin Mariam Jijo
CONTENTS
❖Coding Standard and coding ❖Test Suites Design
Guidelines
❖Testing Conventional
❖ Code Review Applications
❖Software Documentation ❖ Testing Object Oriented
Applications
❖Testing Strategies
❖Testing Web and Mobile
❖Testing Techniques Applications
❖Testing Tools (Win runner,
Load runner).
CODING
• Good software development organizations normally require their
programmers to adhere to some well- defined and standard style of coding
called coding standards.
• The purpose of requiring all engineers of an organization to adhere to a
standard style of coding is the following:
̶ A coding standard gives a uniform appearance to the codes written by
̶ different engineers.
̶ It enhances code understanding.
̶ It encourages good programming practices.
o It does not include the execution of the code. o It includes the execution of the code.
o Methods used in verification are reviews, walkthroughs, o Methods used in validation are Black Box Testing, White
inspections and desk-checking. Box Testing and non-functional testing.
o It checks whether the software conforms to o It checks whether the software meets the requirements
specifications or not. and expectations of a customer or not.
o It can find the bugs in the early stage of the o It can only find the bugs that could not be found by the
development. verification process.
❑ Bottom-up testing
❑ Sandwich testing
Top down testing
Top-down testing is a type of incremental integration testing approach in
which testing is done by integrating or joining two or more modules by
moving down from top to bottom through control flow of architecture
structure.
In these, high-level modules are tested first, and then low-level modules are
tested.
Then, finally, integration is done to ensure that system is working properly.
Stubs and drivers are used to carry out this project.
This technique is used to increase or stimulate behavior of Modules that are
not integrated into a lower level.
Top down approach
Bottom up approach
Sandwich testing
VALIDATION TESTING
❑ The process of evaluating software during the development
process or at the end of the development process to determine
whether it satisfies specified business requirements.
❑ Validation Testing ensures that the product actually meets the
client's needs. It can also be defined as to demonstrate that the
product fulfills its intended use when deployed on appropriate
environment.
❑ Validation testing provides final assurance that software meets
all informational, functional, behavioral, and performance
requirements.
Alpha test Beta test
•The alpha test is conducted at the • The beta test is conducted at
developer’s site by a one or more end-user sites.
representative group of end users. • Unlike alpha testing, the
•The software is used in a natural developer generally is not
setting with the developer “looking present.
over the shoulder” of the users • Therefore, the beta test is
and recording errors and usage a “live” application of the
problems. software in an
environment that cannot
•Alpha tests are conducted in a be controlled by the
controlled environment. developer.
Regression testing
▪Regression testing is the re-execution of some subset of tests that
have already been conducted to ensure that changes have not
propagated unintended side effects
▪Whenever software is corrected, some aspect of the software
configuration (the program, its documentation, or the data that support
it) is changed.
▪Regression testing helps to ensure that changes (due to testing or for
other reasons) do not introduce unintended behavior or additional
errors.
▪Regression testing may be conducted manually, by re-executing a
subset of all test cases or using automated capture/playback tools.
SMOKE TESTING
A common approach for creating “daily builds” for product software
Smoke testing steps:
Software components that have been translated into code are integrated into a
“build.”
A build includes all data files, libraries, reusable modules, and engineered
components that are required to implement one or more product functions.
A series of tests is designed to expose errors that will keep the build from properly
performing its function.
The intent should be to uncover “show stopper” errors that have the highest
likelihood of throwing the software project behind schedule.
The build is integrated with other builds and the entire product (in its current form)
is smoke tested daily.
The integration approach may be top down or bottom up.
SYSTEM TESTING
•In system testing the software and other system elements are tested as a
whole.
•To test computer software, you spiral out in a clockwise direction along
streamlines that increase the scope of testing with each turn.
•System testing verifies that all elements mesh properly and that overall
system function/performance is achieved.
Recovery Testing Security Testing
Stress Testing Performance Testing
Deployment Testing
•Recovery testing is a system test that forces the software to fail in a
variety of ways and verifies that recovery is properly performed.
•If recovery is automatic (performed by the system itself), re
initialization, check pointing mechanisms, data recovery, and restart
are evaluated for correctness.
If recovery requires human intervention, the mean-time-to-repair
(MTTR) is evaluated to determine whether it is within acceptable
limits.
•Security testing attempts to verify that protection mechanisms built
into a system will, in fact, protect it from improper penetration.
•During security testing, the tester plays the role(s) of the individual
who desires to penetrate the system.
•Stress testing executes a system in a manner that demands
resources in abnormal quantity, frequency, or volume.
•A variation of stress testing is a technique called sensitivity testing.
•Performance testing is designed to test the run-time performance of
software within the context of an integrated system.
• Using white-box testing methods, you can derive test cases that
1. Guarantee that all independent paths within a module have been
bounds.
4. Exercise internal data structures to ensure their validity.
• White Box Testing method is applicable to the following levels of
software testing:
̶ It is mainly applied to Unit testing and Integration testing
̶ Unit Testing: For testing paths within a unit.
̶ Integration Testing: For testing paths between units.
̶ System Testing: For testing paths between subsystems
White box testing advantages
•Testing can be commenced at an earlier stage. One need not wait for
the GUI to be available.
•Testing is more thorough, with the possibility of covering most paths.
White box testing disadvantages
•Since tests can be very complex, highly skilled resources are
required, with thorough knowledge of programming and
implementation.
•Test script maintenance can be a burden if the implementation
changes too frequently.
•Since this method of testing it closely tied with the application being
testing, tools to cater to every kind of implementation/platform may not
be readily available.
BLACK BOX TESTING
void main()
int i,j,k;
readln (i,j,k);
writeln("then part");
if (j < k)