SE Lec 07 - Software Testing I
SE Lec 07 - Software Testing I
SOFTWARE TESTING - I
STATIC TESTING
Email: [email protected]
Office hours: Mon-Sat, 10:00AM - 01:00PM
Topics to Cover
Software Testing
Testing Process
Testing Stages
Principles of Testing
Test Cases
Testing Types
Black Box testing
Software Testing
Software testing is the process of analyzing a software item to detect the
differences between existing and required conditions (that is, bugs) and to
evaluate the features of the software item (IEEE, 1986; IEEE, 1990).
Testing Process
Who Tests the Software
Stages of Testing
Unit testing
Component Testing
Module testing
System testing
Acceptance testing
Static Testing
In software development, static testing, also called dry run testing, is a form of
software testing where the authors manually read their own documents/code to find
any errors.
The term ―static‖ in this context means ―not while running‖ or ―not while executing‖
Objectives of Static Testing
Static testing is the least expensive form of testing and has the largest
potential for reducing defects in software under development.
For the first step, clean up the cosmetic appearance of the document: check spelling, check
grammar, check punctuation, and check formatting.
The benefit of doing the first step is that when the document is cosmetically clean, the readers can
concentrate on the content.
The liability of skipping the first step is that if the document is not cosmetically clean, the readers
will surely stop reading the document for meaning and start proofreading to the detriment of
content review.
For the second step, use whatever techniques seem appropriate to focus expert review on
document contents.
Some popular and effective techniques used for content review are discussed in the next section
Static Testing Techniques
Inspections
Walk-throughs
Desk checking
Peer Ratings
Desk Checking
Introduction
Drawbacks
Desk Checking [6]
Desk Checking is one of the older practice of human error-detection process. A desk
check can be viewed as a one-person inspection or walkthrough: A person reads a
program, checks it with respect to an error list, and/or walks test data through it.
In other words you can say Manually testing the logic of a program.
Desk Checking Process [6]
Desk checking involves first running a spellchecker,
grammar checker, syntax checker, or whatever tools
are available to clean up the cosmetic appearance
of the document.
Desk checking is the least formal and least time-consuming static testing technique.
Of all the techniques, desk checking is the only one whereby the author is encouraged
to test his or her own document. The remaining techniques rely on independent eyes to
provide a more thorough and objective review.
A second, and more important, reason is that it runs counter to a testing principle (―that
people are generally ineffective in testing their own programs‖). For this reason, you could
deduce that desk checking is best performed by a person other than the author of the
program.
Test Case
A test case in software engineering is a set of conditions or variables under which a tester will
determine whether an application or software system meets specifications.
A test case has components that describes an input, action or event and an expected response,
to determine if a feature of an application is working correctly.
The mechanism for determining whether a software program or system has passed or failed
such a test is known as a test oracle.
Test Suite: A collection of test cases.
A test case may include many subsets.
Test Case
Test Case ID: It is unique number given to test case in order to be identified.
Test description: The description of test case you are going to test.
Revision history: Each test case has to have its revision history in order to know when
and by whom it is created or modified.
Test Setup: Anything you need to set up outside of your application for example
printers, network and so on.
Test Case
Expected Results: The description of what you expect the function to do.
What to test ? A
X
black-box/functional testing
B
The emphasis is on reducing internal faults so that there is less chance for
failures later on no matter what kind of application environment the
software is subjected to.
Gray Box Testing
Gray box testing is a software testing technique that uses a combination of black box testing
and white box testing. Gray box testing is not black box testing, because the tester does
know some of the internal workings of the software under test.
In gray box testing, the tester applies a limited number of test cases to the internal workings
of the software under test. In the remaining part of the gray box testing, one takes a black
box approach in applying inputs to the software under test and observing the outputs.
This is particularly important when conducting integration testing between two modules of
code written by two different developers, where only the interfaces are exposed for test.
BLACK BOX TESTING TECHNIQUES
The term first originates from a class project at the University of Wisconsin
1988 although similar techniques have been used in the field of quality
assurance, where they are referred to as robustness testing or negative
testing.
Omission Testing
Omission Testing (also called Missing Case Testing):
Other studies show than an average of 22 to 54% of all client reported defects are caused by
missing cases.
Null Case Testing
Null Testing: (a specific case of Omission Testing, but triggers defects extremely often)
Exposes defects triggered by no data or missing data.
Often triggers defects because developers create programs to act upon data, they
don’t think of the case where the project may not contain specific data types