CS 470 - Week 6 - Session 1

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

Sir Syed University of Engineering & Technology, Karachi

CS-470
Software Quality Assurance & Testing
Week 6
Session 1

Batch - 2017 Department of Computer Science 1


CATEGORIES OF TEST CASE DESIGN TECHNIQUES

2
CATEGORIES OF TEST CASE DESIGN TECHNIQUES
• The test case design techniques we will look at are grouped into three categories:
– Specification based or Black Box:
• Those based on deriving test cases directly from a specification or a
model of a system or proposed system, known as specification-based or
black-box techniques.
• So black-box techniques are based on an analysis of the test basis
documentation, including both functional and non-functional aspects.
• They do not use any information regarding the internal structure of the
component or system under test.
– Structure based or White box:
• Those based on deriving test cases directly from the structure of a
component or system, known as structure-based, structural or white-box
techniques. We will concentrate on tests based on the code written to
implement a component or system in this chapter, but other aspects of
structure, such as a menu structure, can be tested in a similar way.
– Experience based:
• Those based on deriving test cases from the tester’s experience of similar
systems and general experience of testing, known as experience-based
techniques.
3
Categories of testing
• There is an ongoing debate over whether testing the functionality of software
• solely according to its outputs is sufficient to achieve an acceptable level of
• quality. Some claim that the internal structure of the software and the calculations
(i.e., the underlying mathematical structure, also known as the
• software “mechanism”) should be included for satisfactory testing. Based on
• these two opposing concepts or approaches to software quality, two testing
• classes have been developed:
• Black box (functionality) testing. Identifies bugs only according to software
malfunctioning as they are revealed in its erroneous outputs. In
• cases that the outputs are found to be correct, black box testing disregards the
internal path of calculations and processing performed.
• White box (structural) testing. Examines internal calculation paths in
• order to identify bugs. Although the term “white” is meant to emphasize
• the contrast between this method and black box testing, the method’s
• other name – “glass box testing” – better expresses its basic characteristic, that of
investigating the correctness of code structure.

4
SPECIFICATION-BASED (BLACK-BOX) TECHNIQUES

5
IEEE definitions
• Black box testing:
• (1) Testing that ignores the internal mechanism of a system or component and
• focuses solely on the outputs generated in response to selected inputs
• and execution conditions.
• (2) Testing conducted to evaluate the compliance of a system or component
• with specified functional requirements.
• White box testing:
• Testing that takes into account the internal mechanism of a system or component.
• In many cases both concepts are applicable, although for some SQA requirements
only one class of tests is suitable. Due to cost considerations, most of the testing
carried out currently is black box testing, which is relatively less costly.

6
Classification according to requirements
• McCall model has been extended here to the classification of the tests carried out
to ensure full coverage of the respective requirements.

7
8
Classification according to requirements
• Application of white box and black box testing in the performance of requirements
tests has revealed the advantages and disadvantages of each testing concept.
• More specifically, as already implied, white box tests of data processing and
calculation correctness can be replaced by black box tests of output correctness.
• Maintainability tests can be implemented by both white box and black box tests, as
the findings of each testing concept are complementary.
• Tests for the other requirements, however, because of their specific characteristics,
can be implemented according to only one or the other concept.
• The applicability of each testing concept for the various requirement factors is
presented in Table

9
10
SPECIFICATION-BASED (BLACK-BOX) TECHNIQUES
• The main thing about specification-based techniques is that they derive test cases
directly from the specification or from some other kind of model of what the
system should do.
• The source of information on which to base testing is known as the ‘test basis’.
• If a test basis is well defined and adequately structured we can easily identify test
conditions from which test cases can be derived.
• Remember, also, that the specification can contain non-functional elements as well
as functions; topics such as reliability, usability and performance are examples.
These need to be systematically tested as well.
• Five specification-based techniques:
– Equivalence partitioning
– Boundary value analysis
– Decision table testing
– State transition testing
– Use case testing

11

You might also like