Professional Documents
Culture Documents
Design is the first step in the development phase for any engineered product or system.
Design is about HOW the system will perform its functions.
Software Design:
A software design is a meaningful engineering representation of some software product that
is to be built.
The process of applying various techniques and principles for the purpose of defining a device,
a process or a system in sufficient detail to permit its physical realization”
As one of the most complex man-made artifacts, computer software is very difficult to design.
There are many factors that affect designs and many stakeholders, i.e. people who participate
in the design process, play various different roles in the design processes and influence the
design of software.
Software Design – Simplified:
Requirements specification was about the WHAT the system will do. Design is about the HOW
the system will perform its functions.
Design Principles:
1- The design process should not suffer from “tunnel vision.”
A good designer should consider alternative approaches, judging each based on the
requirements of the problem, the resources available to do the job, and the design concepts.
2- The design should be traceable to the analysis model.
3- The design should not reinvent the wheel.
Systems are constructed using a set of design patterns. These patterns should always be
chosen as an alternative to reinvention.
Time is short and resources are limited! Design time should be invested in representing truly
new ideas and integrating those patterns that already exist.
4- The design should “minimize the intellectual distance” between the software and the
problem as it exists in the real world.
5- The design should exhibit uniformity and integration.
6- The design should be reviewed to minimize conceptual (semantic) errors
7- Design is not coding, coding is not design
Even when detailed designs are created for program components, the level of abstraction of
the design model is higher than source code.
8- The design should be structured to accommodate change
9- The design should be assessed for quality as it is being created.
Design Concepts:
Fundamental Concepts:
abstraction—data, procedure, control
refinement—elaboration of detail for all abstractions
modularity—compartmentalization of data and function
architecture—overall structure of the software Structural properties, Extra-structural
properties, Styles and patterns
Procedure—the algorithms that achieve function
Hiding—controlled interfaces.
Find bugs as early as possible and make sure they get fixed
Study the functionality in detail to find where the bugs are likely to occur.
Study the code to ensure that each and every line of code is tested.
Create test cases in such a way that testing is done to uncover the hidden bugs and
also ensure that the software is usable and reliable
Objectives of testing:
code modules
individual applications
client/server applications on a network.
Integration Testing:
System Testing:
Systems Integration Testing:
Acceptance Testing:
TESTING METHODOLOGIES AND TYPES:
Black box testing, White box testing
Black box testing:
No knowledge of internal design or code required.
Tests are based on requirements and functionality.
Not based on any knowledge of internal design or code.
Covers all combined parts of a system.
Tests are data driven.
It uncovers: Incorrect or missing functions, Interface errors, Errors in data structures or
external database access, Performance errors, Initialization and termination errors.
Equivalence Partitioning:
Input data and output results often fall into different classes where all members of a class are
related.
Each of these classes is an equivalence partition or domain where the program behaves in an
equivalent way for each class member.
Test cases should be chosen from each partition.
Black-box technique divides the input domain into classes of data from which test cases can
be derived.
Boundary Value Analysis:
Black-box technique:
Focuses on classes and also on the boundaries of the input domain.
Guidelines:
1. If input condition specifies a range bounded by values a and b, test cases should
include a and b, values just above and just below a and b
2. If an input condition specifies a number of values, test cases should exercise the
minimum and maximum numbers, as well as values just above and just below the
minimum and maximum values.
Types of black box testing: Functional testing, System testing, End-to-end testing, Sanity
testing, Regression testing, Acceptance testing, Load testing, Stress testing, Install/uninstall
testing, Recovery testing, Compatibility testing, Exploratory testing, Comparison testing,
Alpha testing, Beta testing, Mutation testing.
Types of black box testing:
Functional testing
Black box type testing geared to functional requirements of an application.
System testing
Black box type testing that is based on overall requirements specifications; covering all
combined parts of the system.
End-to-end testing
Similar to system testing; involves testing of a complete application environment in a situation
that mimics real-world use.
Sanity testing
Initial effort to determine if a new software version is performing well enough to accept it for
a major testing effort.
Regression testing
Re-testing after fixes or modifications of the software or its environment.
Acceptance testing
Final testing based on specifications of the end-user or customer.
Load testing
Testing an application under heavy loads.
Eg. Testing of a web site under a range of loads to determine, when the system response time
degraded or fails.
Stress Testing
Testing under unusually heavy loads, heavy repetition of certain actions or inputs, input of
large numerical values, large complex queries to a database etc.
Term often used interchangeably with ‘load’ and ‘performance’ testing.
Performance testing
Testing how well an application complies to performance requirements.
Install/uninstall testing
Testing of full, partial or upgrade install/uninstall process.
Recovery testing
Testing how well a system recovers from crashes, HW failures or other problems.
Compatibility testing
Testing how well software performs in a particular HW/SW/OS/NW environment.
Exploratory testing / ad-hoc testing
Informal SW test that is not based on formal test plans or test cases; testers will be learning
the SW in totality as they test it.
Comparison testing
Comparing SW strengths and weakness to competing products.
Alpha testing
Testing done when development is nearing completion; minor design changes may still be
made as a result of such testing.
Beta-testing
Testing when development and testing are essentially completed and final bugs and problems
need to be found before release.
Mutation testing
To determining if a set of test data or test cases is useful, by deliberately introducing various
bugs. Re-testing with the original test data/cases to determine if the bugs are detected.
White box testing / Structural testing:
All independent paths within a module have been exercised at least once
Exercise all logical decisions on their true and false sides
Execute all loops at their boundaries and within their operational bounds
Exercise internal data structures to ensure their validity.
Coverage:
Statement Coverage:
In this scheme, statements of the code are tested for a successful test that checks all the
statements lying on the path of a successful scenario.
Branch Coverage:
In this scheme, all the possible branches of decision structures are tested. Therefore,
sequences of statements following a decision are tested.
Path Coverage:
In path coverage, all possible paths of a program from input instruction to the output
instruction are tested. An exhaustive list of test cases is generated and tested against the
code.
Path testing – Control Flow Graph:
Program flow graph
Basic Control Flow Graphs
easy to compute
applicable to all kinds of programs
Disadvantages
easy to compute
empirical studies: good correlation between cyclomatic complexity and
understandability
Disdvantages