UNIT 4
UNIT 4
Validation:
➔ Validation is the process of checking whether the software product is up to
the mark.
➔ In other words the product has high level requirements.
➔ It is the process of checking the validation of product i.e. it checks what we
are developing is the right product.
➔ It is validation of actual and expected products.
➔ Validation is the Dynamic Testing.
Difference between verification and validation testing:
Software Inspections:
There are some of the stages in the software inspection process such as-
● Planning : The moderator plans the inspection.
● Overview Meeting: The background of the work product is described
by the author.
● Preparation: The examination of the work product is done by
inspector to identify the possible defects.
● Inspection Meeting: The reader reads the work product part by part
during this meeting and the inspectors the faults of each part.
● Rework: After the inspection meeting, the writer changes the work
product according to the work plans.
● Follow Up: The changes done by the author are checked to make
sure that everything is correct.
2. Control faults:
❏ For each conditional statement, is the condition correct?
❏ Is each loop certain to terminate?
❏ Are compound statements correctly bracketed?
❏ In case statements, are all possible cases accounted for?
❏ If a break is required after each case in case statements, has it been
included?
3. Input/output faults:
❏ Are all input variables used?
❏ Are all output variables assigned a value before they are output?
❏ Can unexpected inputs cause corruption?
4. Interface faults:
❏ Do all function and method calls have the correct number of parameters? ❏
Do formal and actual parameter types match?
❏ Are the parameters in the right order?
❏ If components access shared memory, do they have the same model of the
shared memory structure?
Inspections are one form of static analysis where you examine the program
without executing it.
● Inspections are often driven by checklists of errors and heuristics that identify
common errors in different programming languages.
● For some errors and heuristics( an approach to problem solving or self
discovery ), it is possible to automate the process of checking programs against
this list, which has resulted in the development of automated static analysers for
different programming languages.
● Static analysers are software tools that scan the source text of a program and
detect possible faults and anomalies.
● They parse the program text and thus recognise the types of statements in
the program.
● They can then detect whether statements are well formed, make inferences
about the control flow in the program and, in many cases, compute the set of all
possible values for program data.
● They complement the error detection facilities provided by the language
compiler.
● They can be used as part of the inspection process or as a separate V & V
process activity.
● The intention of automatic static analysis is to draw an inspector’s attention to
anomalies in the program, such as variables that are used without initialisation,
variables that are unused or data whose value could go out of range.
The stages involved in static analysis include:
1. Control flow analysis
❏ This stage identifies and highlights loops with multiple exit or entry points
and unreachable code.
❏ Unreachable code is code that is surrounded by unconditional goto
statements or that is in a branch of a conditional statement where the guarding
condition can never be true.
3. Interface analysis
❏ This analysis checks the consistency of routine and procedure declarations
and their use.
❏ It is unnecessary if a strongly typed language such as Java is used for
implementation as the compiler carries out these checks.
❏ Interface analysis can detect type errors in weakly typed languages like
FORTRAN and C.
❏ Interface analysis can also detect functions and procedures that are declared
and never called or function results that are never used.
5. Path analysis
❏ This phase of semantic analysis identifies all possible paths through the
program and sets out the statements executed in that path.
❏ It essentially unravels the program’s control and allows each possible
predicate to be analyzed individually.
Formal specification and proof do not guarantee that the software will be
reliable in practical use.
The reasons for this are:
1. The specification may not reflect the real requirements of system users.
System users rarely understand formal notations so they cannot read the
formal specification directly to find errors and omissions.
2. The proof may contain errors.Program proofs are large and complex, so, like
large and complex programs, they usually contain errors.
3. The proof may assume a usage pattern which is incorrect. If the system is not
used as anticipated, the proof may be invalid.
★ There are three teams involved when the Cleanroom process is used
for large system development:
1. The specification team
❏ This group is responsible for developing and maintaining the system
specification.
❏ This team produces customer-oriented specifications (the user
requirements definition) and mathematical specifications for verification.
❏ In some cases, when the specification is complete, the specification
team also takes responsibility for development.
2. The development team
❏ This team has the responsibility of developing and verifying the
software.
❏ The software is not executed during the development process.
❏ A structured, formal approach to verification based on inspection of
code supplemented with correctness arguments is used.
3. The certification team
❏ This team is responsible for developing a set of statistical tests to
exercise the software after it has been developed.
❏ These tests are based on the formal specification.
❏ Test case development is carried out in parallel with software
development.
❏ The test cases are used to certify the software reliability. Reliability
growth models used to decide when to stop testing.
CHAPTER 2
SOFTWARE TESTING
For example:
1. All system functions that are accessed through menus should be tested.
2. Combinations of functions (e.g., text formatting) that are accessed through
the same menu must be tested.
3. Where user input is provided, all functions must be tested with both correct
and incorrect input.
There are two types of Software testing
1. Manual Testing
2. Automation Testing
Manual Testing
Automation Testing
System Testing
System testing involves integrating two or more components that implement system
functions or features and then testing this integrated system. In an iterative
development process, system testing is concerned with testing an increment to be
delivered to the customer; in a waterfall process, system testing is concerned with
testing the entire system.
For most complex systems, there are two distinct phases to system testing:
1. Integration testing, where the test team has access to the source code of the
system.
❏ When a problem is discovered, the integration team tries to find the source of the
problem and identify the components that have to be debugged.
2. Release testing, where a version of the system that could be released to users is
tested.
❏ Here, the test team is concerned with validating that the system meets its
requirements and with ensuring that the system is dependable.
❏ Release testing is usually ‘black-box’ testing where the test team is simply
concerned with demonstrating that the system does or does not work properly.
❏ Problems are reported to the development team whose job is to debug the program.
Integration testing
● The process of system integration involves building a system from its components
and testing the resultant system for problems that arise from component interactions.
● Integration testing checks that these components actually work together, are called
correctly and transfer the right data at the right time across their interfaces.
● System integration involves identifying clusters of components that deliver some
system functionality and integrating these by adding code that makes them work
together.
● Drawback:
○ There are complex interactions between the system components and, when an
anomalous output is discovered, you may find it hard to identify where the error
occurred.
● To make it easier to locate errors, you should always use an incremental approach to
system integration and testing. Initially, you should integrate a minimal system
Regression testing:
○ These problems mean that when a new increment is integrated, it is important to
rerun the tests for previous increments as well as the new tests that are required to
verify the new system functionality.
○ Rerunning an existing set of tests is called regression testing.
○ If regression testing exposes problems, then you have to check whether these are
problems in the previous increment that the new increment has exposed or whether
these are due to the added increment of functionality.
○ Regression testing is clearly an expensive process and is impractical without some
automated support.
Release testing:
● Release testing is the process of testing a release of the system that will be
distributed to customers.
● The primary goal of this process is to increase the supplier’s confidence that the
system meets its requirements. If so, it can be released as a product or delivered to the
customer.
● Release testing is usually a black-box testing process where the tests are derived
from the system specification.
Performance testing:
● Once a system has been completely integrated, it is possible to test the system for
emergent properties such as performance and reliability.
● Performance tests have to be designed to ensure that the system can process its
intended load.
● This usually involves planning a series of tests where the load is steadily increased
until the system performance becomes unacceptable.
● As with other types of testing, performance testing is concerned both with
demonstrating that the system meets its requirements and discovering problems and
defects in the system.
● To test whether performance requirements are being achieved, you may have to
construct an operational profile.
Component Testing
Component testing also known as unit testing is the process of testing individual
components in the system.
● This is a defect testing process so its goal is to expose faults in these components.
● For most systems, the developers of components are responsible for component
testing.
● There are different types of component that may be tested at this stage:
● Test Scenario
● Test Steps
● Prerequisite
● Test Data
● Expected Result
● Test Parameters
● Actual Result
● Environment Information
● Comments
Example:
Test Automation
Software metrics will be useful only if they are characterized effectively and
validated so that their worth is proven. There are 4 functions related to software
metrics:
1. Planning
2. Organizing
3. Controlling
4. Improving
1. Product Metrics: Product metrics are used to evaluate the state of the
product, tracing risks and undercover prospective problem areas. The
ability of the team to control quality is evaluated.
2. Process Metrics: Process metrics pay particular attention to
enhancing the long-term process of the team or organization.
3. Project Metrics: The project matrix describes the project characteristic
and execution process.
○ Number of software developer
○ Staffing patterns over the life cycle of software
○ Cost and schedule
○ Productivity
Function-Oriented Metrics
● Once these data have been collected, a complexity value is associated with
each count. Organizations that use function point methods develop criteria for
determining whether a particular entry is simple, average, or complex.
Each of the above questions is answered using a scale that ranges from o to 5
(not important or applicable to absolutely essential).
This scale is shown below :
After calculating the function point, various other measures can be calculated as shown
below :
Productivity = FP / person-month
Quality = Number of faults / FP
Cost = $ / FP
Documentation = Pages of documentation / FP
Example:
Compute the FP for an embedded system with the following characteristics:
1. Internal data structures = 8
2. No. of user inputs = 32
3. No. of user outputs = 60
4. No. of user inquiries = 24
5. No. of external interfaces = 2
Averag Comple
e x
Sr. Measurem Simple Weighti Weighti
No ent * Weightin ng ng Calculat
. Parameter Count * g factor factor factor ed Value
Number of
external
1 inputs(EI) 32 * 3 4 6 128
Number of
external
2 outputs(EO) 60 * 4 5 7 300
Number of
external
Inquiries(EQ
3 ) 24 * 3 4 6 96
Number of
internal files
4 (ILF) 8 * 7 10 15 80
Number of
external
interfaces(EI
5 F) 2 * 5 7 10 14
Count –
Total —–> 618
CHAPTER 4
● Project cost estimation and project scheduling are normally carried out
together.
● The costs of development are primarily the costs of the effort involved, so
the effort computation is used in both the cost and the schedule estimate.
● However, you may have to do some cost estimation before detailed
schedules are drawn up.
● These initial estimates may be used to establish a budget for the project
or to set a price for the software for a customer:
There are three parameters involved in computing the total cost of a software
development project:
1. Hardware and software costs including maintenance
2. Travel and training costs
3. Effort costs (the costs of paying software engineers
Static, Single Variable Models: When a model makes use of single variables
to calculate desired values such as cost, time, efforts, etc. is said to be a single
variable model.
Where C = Costs
L= size
a and b are constants
The Software Engineering Laboratory established a model called SEL model, for
estimating its software production.
This model is an example of the static, single variable model.
Static multivariable model
WALSTON and FELIX develop the models at IBM provide the following
equation gives a relationship between lines of source code and effort:
Software Productivity
● You can measure productivity in a manufacturing system by counting the
number of units that are produced and dividing this by the number of
person-hours required to produce them.
● However, for any software problem, there are many different solutions,
each of which has different attributes. One solution may execute more
efficiently while another may be more readable and easier to maintain.
● When solutions with different attributes are produced, comparing their
production rates is not really meaningful.
● Nevertheless, as a project manager, you may be faced with the problem
of estimating the productivity of software engineers.
● You may need these productivity estimates to help define the project
cost or schedule, to inform investment decisions or to assess whether
process or technology improvements are effective.
● Productivity estimates are usually based on measuring attributes of the
software and dividing this by the total effort required for development.
There are two types of metric that have been used:
1. Size-related metrics.
● These are related to the size of some output from an activity.
● The most commonly used size- related metric is lines of delivered
source code(LOC).
● Other metrics that may be used are the number of delivered object code
instructions or the number of pages of system documentation.
2. Function-related metrics.
● These are related to the overall functionality of the delivered software.
● Productivity is expressed in terms of the amount of useful functionality
produced in some given time.
● Function points and object points are the best-known metrics of this
type.
Estimation Techniques
● Organizations need to make software effort and cost estimates.
● To do so, one or more of the techniques described below may be used.
● All of these techniques rely on experience-based judgements by project
managers who use their knowledge of previous projects to arrive at an
estimate of the resources required for the project.
● However, there may be important differences between past and future
projects. Many new development methods and techniques have been
introduced in the last 10 years.
● Some examples of the changes that may affect estimates based on
experience include:
1. Distributed object systems rather than mainframe-based systems
2. Use of web services
3. Use of ERP(Enterprise resource planning) or database-centered systems
4. Use of off-the-shelf software rather than original system development
5. Development for and with reuse rather than new development of all
parts of a system
6. Development using scripting languages such as TCL or Perl
7. The use of CASE tools and program generators rather than
unsupported software development.
Various Cost estimation techniques are as follows:
● Algorithmic cost modeling
○ A model is developed using historical cost information that relates some
software metric (usually its size) to the project cost.
○ An estimate is made of that metric and the model predicts the effort required.
● Expert judgment
○ Several experts on the proposed software development techniques and the
application domain are consulted.
○ They each estimate the project cost.
○ These estimates are compared and discussed.
○ The estimation process iterates until an agreed estimate is reached.
● Estimation by analogy (comparing)
○ This technique is applicable when other projects in the same application
domain have been completed.
○ The cost of a new project is estimated by analogy with these completed
projects. ○ Myers (Myers, 1989) gives a very clear description of this approach.
● Parkinson’s Law
○ Parkinson’s Law states that work expands to fill the time available.
○ The cost is determined by available resources rather than by objective
assessment.
○ If the software has to be delivered in 12 months and 5 people are available,
the effort required is estimated to be 60 person-months.
● Pricing to win
○ The software cost is estimated to be whatever the customer has available to
spend on the project.
○ The estimated effort depends on the customer’s budget and not on the
software functionality.
1. Organic:
❏ A development project can be treated of the organic type, if the project deals
with developing a well-understood application program, the size of the
development team is reasonably small, and the team members are
experienced in developing similar methods of projects.
❏ Examples of this type of projects are simple business systems, simple
inventory management systems, and data processing systems.
2. Semidetached:
❏ A development project can be treated with semidetached type if the
development consists of a mixture of experienced and inexperienced staff.
❏ Team members may have finite experience in related systems but may be
unfamiliar with some aspects of the order being developed.
❏ Example of Semidetached system includes developing a new operating
system (OS), a Database Management System (DBMS), and complex inventory
management system.
3. Embedded:
❏ A development project is treated to be of an embedded type, if the software
being developed is strongly coupled to complex hardware, or if the stringent
regulations on the operational method exist.
❏ For Example: ATM, Air Traffic control. For three product categories, Bohem
provides a different set of expression to predict effort (in a unit of person
month)and development time from the size of estimation in KLOC(Kilo Line of
code) efforts estimation takes into account the productivity loss due to holidays,
weekly off, coffee breaks, etc.
1. Basic Model
2. Intermediate Model
3. Detailed Model