Unit 8 – Testing
Outcomes & Introduction
Unit 8 Outcomes
Explain the software testing process.
Compare verification and validation.
Understand the importance of software inspection.
Analyze testing methods: unit, system, integration,
performance, acceptance, regression, alpha, and beta
testing.
Unit 8 Outcomes
Differentiate between development, release, and user
testing.
Compare white box and black box testing.
Explain test stubs and drivers, test cases, and test suites.
Illustrate static testing strategies: code review, code
walkthrough, and automated testing methods.
Testing
Software testing is a technique to check whether the
developed software product does the required function
without any defects.
During testing, the program is executed using sample or
artificial data known as test cases.
Different errors, irregularities, defects, etc. are identified.
Testing can be manual or automated.
Testing
Testing is useful in checking whether software fulfills the
functional and non-functional requirements or not.
A common picture of testing is that all untested code
contains some defects.
The different terms in testing are bugs, defects, errors,
faults, and failures.
Need of Testing
Nissan cars had software failure which led to accidents and
1 million cars were recalled from the market.
Due to software defects some of the retailers on Amazon observed that
their prices is reduced, and they were in heavy loss.
Windows 10 was weak in security due to a software bug.
China Airlines’ fighter plane F-35 was with a software bug, and it
crashed leading to the loss of more than 200 people.
Unit 8 – Testing
Testing Objectives
Bugs, Defects, Errors
The defect in the software is informally known as a bug. The bug
may be due to an algorithm, resources, or logic.
When the system is not meeting the requirements then it is said
to have a defect. Defects can be major, critical, or minor.
When there is a mistake in a code then it is called an error. Errors
may be the syntax, semantics, hardware, testing errors, etc.
Faults, and Failures
The state of incorrect working of a system is known as a fault.
There may be a fault in the interface, or front end, security, the
performance of the software, etc.
The system leads to failure if there are multiple defects. If the
defect is causing incorrect functioning of the system, then the
system is in failure condition.
Testing Objective - 1
To show to the software developer and client that the
developed software meets the specified requirements.
If the software is a customized product, then for each
requirement there should be at least a single test case.
This is validation testing: a process of finding errors by
executing the program in a real environment.
Testing Objective - 2
To find those situations where the software behavior is
erroneous, not desirable, and not meeting its specification.
If there are defects in the developed software, then it may lead
to accidents such as security violations, system crashes, wrong
computations, and loss of data. This testing is known as defect
testing.
This is also known as verification: The process of checking that
the software meets specifications.
Unit 8 – Testing
Verification vs. Validation
Verification
In verification, the software requirements specification, design, and
code are checked. It may not include program execution.
Code inspections, reviews, or code walkthroughs are performed in this
stage. The verification is performed by the system analysts and
designers.
High-level design and database design are tested in verification in the
early stages of software development.
Validation
Validation is a generic process that is used to ensure that the software
meets the client’s requirements. It involves the execution of the code.
The target used in the validation is always the code.
Validation is performed after the verification of the code.
The people involved in validation include the software development
team.
Verification and Validation
Barry Boehm, a well-known scientist in software
engineering, has shown this difference in validation and
verification.
‘Validation: Are we building the right product?’
‘Verification: Are we building the product, right?’
Verification and Validation
The objective of verification and validation is to develop the
confidence in the software system that it is fit for its purpose.
The level of confidence in the system depends on the purpose of
the system.
Consider developing a safety alarm system and a word
processing typesetting system. The level of confidence is more
important in the safety alarm system than in the typesetting
project.
Verification and Validation
The expectation from the users is yet another issue in
building the system’s confidence.
Along with software testing, the verification and validation
process may involve software inspections and reviews.
The requirement specifications, design models, code, and
the proposed tests are checked in the inspection.
This is known as V & V technique
Unit 8 – Testing
Software Inspection
Software Inspection
As the inspection is a process, to discover problems in the static
system representation. (Verification)
There cannot be the communication of errors, whereas in testing
the errors may get hidden or masked. Code inspection can be done
without additional cost on an incomplete program.
Along with the functionality of a system, an inspection can be used
for checking coding standards, portability, and maintainability.
Software Inspection
The requirements and coding standards can be verified using the
inspection process.
Testing is used for the system functioning with the client’s real
data.
Thus, both testing and inspection are necessary for V & V
process.
Software Inspection
Unit 8 – Testing
Software Testing Process
Software Testing Process
Software Testing Process
The test cases specify the input and output in the system with
documentation about it.
Test data is the input from the test cases.
Test data can be generated automatically from test cases, but the
test cases cannot be generated automatically.
Test cases are manually prepared by a team of people who are
aware of the requirements, design, and coding of software.
Software Testing Process
Test results and reports can be generated by automatic method and
manually.
The tests are encoded in the program to be tested.
Looks of the output, menu options, graphical interface, etc. must be
tested using the manual method.
Manual testing also involves the preparation of test cases and test
data. Checking of side effects can be carefully observed in manual
methods.
Software Testing Process
The commercial software testing process goes through the
following stages.
1. Development testing
2. Release testing
3. User testing