Professional Documents
Culture Documents
Introduction
This document provides a comprehensive view of designing software test cases.
This document discuss the Objective, Purpose, Type, format and knowhow about test case and
gives tips on writting test cases for a successive testing of a software. The test case format is
suitable for manual system test cases. The test cases should be written in enough detail that
they could be given to a new team member who would be able to quickly start to carry out the
tests and find defects.
Eligbility of the person who designs the Test cases -> The Person / tester who designs the
test case should be well trained. Well trained in the sense he / she should know each and every
function of module whose test case has to be designed. He / She need to have a thorough
understanding of the application and business reason of the application. Person / tester need to
have a complete understanding of the project.
Topics Covered
1. Objective and Purpose of Black box testing.
2. Type of Black Box Test Case Design.
3. Definition of a Test Case.
4. Qualities of a Good Test case.
5. Format with an example of test case.
6. Features of the Test Cases.
The test cases in a black box test case design are derived from the requirements or the
specifications. The object to be assessed is considered as a black box, i. e. the assessor is not
interested in the internal structure and the behavior of the object to be assessed.
BLACK BOX TEST CASE DESIGNS
• generation of equivalence classes
• marginal value analysis
• intuitive test case definition
• function coverage
Operational Sequence
The principle of the generation of equivalence classes is to group all input data of a
program into a finite number of equivalence classes so it can be assumed that with any
representative of a class it is possible to detect the same errors as with any other
representative of this class.
The definition of test cases via equivalence classes is realized by means of the
following steps:
o Analysis of the input data requirements, the output data requirements, and the
conditions according to the specifications
o Definition of the equivalence classes by setting up the ranges for input and
output data
o Definition of the test cases by means of selecting values for each class
For valid equivalence classes, the valid input data are selected; in case of invalid
equivalence classes erroneous input data are selected. If the specification is available,
the definition of equivalence classes is predominantly a heuristic process.
It is the objective of the marginal value analysis to define test cases that can be used to
discover errors connected with the handling of range margins.
Operational Sequence
The principle of the marginal value analysis is to consider the range margins in
connection with the definition of test cases. This analysis is based on the equivalence
classes defined by means of the generation of equivalence classes. Contrary to the
generation of equivalence classes, not any one representative of the class is selected as
test case but only the representatives at the class margins. Therefore, the marginal
value analysis represents an addition to the test case design according to the generation
of equivalence classes.
Operational Sequence
Basis for this methodical approach is the intuitive ability and experience of human
beings to select test cases according to expected errors. A regulated procedure does not
exist. Apart from the analysis of the requirements and the systematically defined test
cases (if realized) it is most practical to generate a list of possible errors and error-
prone situations. In this connection it is possible to make use of the experience with
repeatedly occurred standard errors. Based on these identified errors and critical
situations the additional test cases will then be defined.
4. Function Coverage
It is the purpose of the function coverage to identify test cases that can be used to
proof that the corresponding function is available and can be executed as well. In this
connection the test case concentrates on the normal behavior and the exceptional
behavior of the object to be assessed.
Operational Sequence
Based on the defined requirements, the functions to be tested must be identified. Then
the test cases for the identified functions can be defined.
Recommendation
With the help of a test case matrix it is possible to check if functions are covered by
several test cases. In order to improve the efficiency of the tests, redundant test cases
ought to be deleted.
DEFINITIONS OF TEST CASE
1. A test case is a detailed procedure that fully tests a feature or an aspect of
a feature.
3. A good test case is one that has a high probability to find an error.
1. test inputs
2. execution conditions
3. expected results
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.
Function to be tested:
The name of function to be tested.
Environment:
It tells in which environment you are testing.
Test Setup:
Anything you need to set up outside of your application for example printers, network and so
on.
Test Execution:
It is detailed description of every step of execution.
Expected Results:
The description of what you expect the function to do.
Actual Results:
pass / failed
If pass - What actually happen when you run the test.
If failed - put in description of what you've observed.
EXAMPLE
12. Carefully selecting test data is as important as defining the steps of the test case. The
concepts of boundary conditions and equivalence partitions are key to good test data
selection. Try these steps to select test data:
• Determine the set of all input values that can possibly be entered for a given input
parameter. For example, the age of a person might be entered as any integer.
• Define the boundary between valid and invalid input values. For example, negative
ages are nonsense. You might also check for clearly unreasonable inputs. For example,
an age entered as 200 is much more likely to be a typo than a user who is actually two-
hundred years old.
• Review the requirements and find boundaries in the valid range that should cause the
system to behave in different ways. For example, the system might treat minors
differently than adults, so the boundary would be age 18.
• Choose one input value somewhere in the middle of each equivalence partition (e.g.,
-5, 12, and 44), one directly on each boundary (e.g., 0 and 18), and one on each side of
each boundary (e.g., 1, 17, and 19). Test data vales that are expected to cause errors
(e.g., -5) should be tested in separate robustness test cases.
• In functional correctness test cases, make sure that you have inputs that will force the
system to generate each possible type of response to valid input. And, in robustness
test cases, make sure to force the system to generate each relevant error message