Test Cases for the Calender Test

STV
TSPC
System Test Specification
1
Location of the Test Specification
13
Test Case Classes
2
Sources of Test Cases
14
Test Case Definition
3
Test Cases from the Requirements Specs
15
Partioning of Test Data
4
Test Cases from the Design Documentation
16
Test Case Table
5
Test Cases from the Usage Profile
17
Test Case for the Calender test
6
Test Case Selection Criteria
18
Test Script for the Calender Test
7
Black-Box Test Methods
19
Test Cases = Test Specification
8
Data Flow Analysis
20
Test Case Specification with TestSpec
9
Work Flow Analysis
21
Requirement based Testing
10
Boundary Value Analysis
22
A7 Flight Control Specification
11
Command Syntax Analysis
23
A7 Test Path Specification
12
State Transition Analysis
24
A7 Test Script
STV
TSPC-1
Location of the Test Specification
Init
Activity of
specifying test
cases
Testplanning
Test
Plan
Test
design
Test
Design
Test
spec.
Test
Cases
Test
execution
Test
Results
Result of Test
Specification
Testevaluation
Testdocu.
Closure
STV
TSPC-2
Sources of Test Cases
Requirement Specs
Design
Documentation
Test
Cases
Usage profile
STV
TSPC-3
Test Cases from the Requirement Specs
1. Customer opens System Menue
2. Sustomer selects Function Open an account
3. Customer gives name, address and profession
4. Customer enters transaction
Testfälle
5) If input is incorrect system will report an error (1)
Customer must correct and repeat
6) If customer is a risk, systm will reject him
(2)
7) If customer already has an account,
(3)
start Function for extra account
8) If no account number free, end transaction
(4)
9) If customer account exits
(5)
start Function to update account
10) System opens new account
(6:8)
STV
TSPC-4
Test Cases from the Design Documentation
Decision Table
Conditions
Name, Address or
Profession invalid
Customer is a risk
Customer has an account
Account Number not free
Account already opened
Rules
J
N
N
N
N
N
N
N
N
-
J
-
N
J
-
N
N
J
-
N
N
N
J
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N












Actions
Report input error
Reject customer
Report already exists
Report no account number
Report Account opended
open the account
Update account statistic
Confirm new account





STV
TSPC-5
Test Cases from the Usage Profile
Open Accounto
anlegen
Name:
Address:
Profession:
STV
TSPC-6
Test Case Selection Criteria
Representative
Selection
Risk based
Selection
Black-Box
Extreme Values
Error Probability
Selection
Classification
of Test cases
White-Box
Normal Values
Selection
Criteria &
Priority
„Invalid Values"
Criteria for test case & test data selection
Bons & van Megen (SQS) 1983
Selection
Criteria
for Test data
STV
TSPC-7
Black-Box Test Methods
(from Boris Beizer)
Data flow analysis
Process flow analysis
Value Domain analysis
Syntax Analysis
State transition analysis
in
Black-Box Testing
John Wiley & Sons
New York, 1995
STV
TSPC-8
Data Flow Analysis
(based on Data Flow Diagrams)
Data Inputs
Data Outputs
PIN
Invalid PIN
message
Invalid Card
message
Card no.
Kontoauszahlung
Account no.
New account
balance
Amount
Receipt
Generate
Validate
STV
TSPC-9
Work Flow Analysis
(based on Work Flow Diagrams)
Process Entry
Start
Process
Process Exits
Customer is
not credible
certify
Customer
Customer
already exists
store
Customer
No Account
available
assign
AccountNo.
open
Account
Account already
opened
New Account
opened
Work Flow Process
STV
TSPC-10
Boundary Value Analysis
(based on Data Value Domains)
Today‘s Date is:
<1900
1900
1900:1949
1950:1999
Lower
Boundary
Value
Upper
Boundary
Value
1950
Date Test
>2000
2000
STV
TSPC-11
Command Syntax Analysis
(based on the Grammar)
(1) (2)(3)
(4)
(5)(6) (7) (8) (9)
DOS-Copy-Anweisung: <drive>:\[{<directory>\}][File[.ext]]
(10) (11)(12)(13) (14) (15)(16)(17) (18) (19)
[,<drive>:\[{<directory>\}][File[.ext]]]
(1) target drive is missing
(11) source drive is missing
(2) target : is missing
(12) source : is missing
(3) target \ is missing
(13) source \ is missing
(4) target directory
(14) source directory
(5) target \ is missing
(15) source \ is missing
(6) n directories in target
(16) n directories in source
(7) target File is missing
(17) source File is missing
(8) target extension is missing
(18) source extension missing
(9) target is missing
(19) source is missing
(10) , comma is missing
STV
TSPC-12
State Transition Analysis
(based on State Transition Graph)
State Tranitions
STATE
Dust
Dust
Child
Single
Married
Divorced
Widowed
X
Child
X
X
Single
X
Married
X
Divorced
X
X
Widowed
X
X
X
X
Ashes to Ashes and Dust to Dust
Life is hard, then you die
X
STV
TSPC-13
Test Case Classes
System
Test cases
Integration
Test cases
Unit
Test cases
STV
TSPC-14
Test Case Definition
Datum:
01.01.98
Test Case No.:
Funktion:
Order-Article
Test Object:
INPUT
Source Object
Input-Name
20
Order Entry Use Case
OUTPUT
Input-Value
Output-Value Output-Name
Input Message
Target Object
Output Message
Field
Field
Field
Field
E1
E2
E3
E4
4711
Smith
10
Article
4711
Schmidt
11
Article
Field
Field
Field
Field
A1
A2
A3
A4
Table B
Table B
Field B1
Field B2
Field B3
4711
Köln
777
10
Field C3
Table C
Table C
Field C1
Field C2
Field C3
4711
Article
80
70
Field C3
STV
TSPC-15
Partitioning of Test Data
I N P U T S:
Order:
M A S T E R D A T A:
Customer
OrderNumber
CustomerNumber (exists/absent)
CustomerNumber
Customername
CustomerName
CustomerCredibility
OrderPosition (9)
ArticleNumber (9)
OrderAmount (9)
O U T P U T S:
Messages:
Order rejected
OrderPosition rejected
OrderPosition is deferred
OrderPosition is fulfilled
Error Messages:
Customer not known
Customer not credible
Article not available
ArticleAmount insufficient
Article
ArticleNumber (exists/absent)
ArticleName
ArticleAmount
ArticlePrice
STV
TSPC-16
Test Case Tables
Testfälle
Order Data
TC-1
OrderNumber
1
2
3333
6666
CustomerNumber
CustomerName
TC-2 TC-31 TC-32 TC-33 TC-4 TC-51 TC-52 TC-53
3
7777
3
3
4
5
Schmidt Huber Meyer Meyer Meyer Kohl Bahr Bahr
1
1
1
2
3
ArticleNumber (9)
4710
4710
4710
4711
4712 4713 4712
OrderAmount (9)
CustomerNumber
CustomerName
CustomerCredibility
1
TC-2
2
3
TC-3 TC-4 TC-5
6666 7777 8888 9999
Huber Meyer Kohl Bahr
0
1
1
1
5
7777 7777 8888 9999 9999 9999
OrderPosition (9)
Customer Data
5
9
1
4
2
1
6
2
Bahr
3
4711 4715
7
4
TC-10
......
5
...... 9999
......
......
Bahr
10
......
4716
......
19
Article Data
TC-31 TC-32 TC-4
TC-51 TC-52
ArticleNumber
4711 4712 4713
4715 4716
ArticleName
Buch Heft
Karte Stempel
ArticleAmount
ArticlePrice
7
9
Stift
9
8
20
99,99 99,99 99,99 99,99 99,99
STV
TSPC-17
Test Cases for the Calender Test
INPUTS
T EST CASES
CalenderData
CalenderNumber
1
2
3
4
4
4
4
4
5
5
5
CalenderName
B
G
G
G
G
G
G
G
G
G
G
0
53
1
1
1
1
1
52 52 52
B
G
G
G
G
G
G
G
1
2
3
4
1
2
13
StartTime
B
G
G
G
G
G
G
EndTime
G
B
G
G
G
G
G
Description
G
G
B
G
G
G
G
Week Number
Week Day
Activity
B = bad
G = good
STV
TSPC-18
Test Script for the Calender Test
Testcase: TC_1
{ CustomerNumber = 1;
CustomerName = " ";
}
Testcase: TC_2
{ CustomerNumber = 2;
CustomerName = "Meyer";
WeekNumber = 0;
}
Testcase: TC_3
{ CustomerNumber = 3;
CustomerName = "Untermeier";
WeekNumber = 53;
}
Testcase: TC_4
{ CustomerNumber = 4;
CustomerName = "Mittelmeier";
WeekNumber = 1;
WeekDay = "Montag";
}
Testcase: TC_5
{ CustomerNumber = 5;
CustomerName = „Obermeier";
WeekNumber = 1;
WeekDay = "Monday";
Activity (1)
{ StartTime
= 0000;
EndTime
= 2400;
Description = "sleep";
}
Activity (2)
{ StartTime
= 2400;
EndTime
= 2430;
Description = "sleep";
}
STV
TSPC-19
Test Cases = Test Specification
Requirements
ORACLE
Test Cases
Program
Specs
DESIGN
Test Specs
Test
Procedures
Programs
Test against the Specs
STV
TSPC-20
Test Case Specification with TESTSPEC
Use Case List
UseCase A
UseCase B
UseCase C
IF < Pre Condition >
THEN < Post Condition >
UseCase N
Per Use Case a Test case for every Pre/Post
Combination
IF
Conditions
PreConditions
PostConditions
Test Cases
SYST
TSPC-21
Requirement based Testing
SPEC
VERIFICATION
=
CORRECTNESS
TEST OBJECT
HUMAN
JUDGEMENT
VALIDATION
Usability
Security
=
RELIABILITY
TARGET
COMPUTER
Fault tolerance
TESTING
STANDARDS
e.g.
IEEE Std
829
ACCEPTANCE
STANDARD
Coverage measurement
Maintainability
Testability
OPERATIONAL
ENVRONMENT
Reliability
SYST
TSPC-22
NRL-A7 Specification of Initeria Measurement Scale
Calibration
MODES
EVENTS
*Lautocal*
*Landaln*
*01Update*
@T(In mode) WHEN
(//IMSSCAL// =$Coarse$)
*HUDaln*
@T(In mode) WHEN
(/IMSMODE/ =$Gndal$
AND //IMSSCAL// =$Coarse$)
*Sautocal*
*SINaln*
*Airaln*
All navigation
modes listed
ACTION
X
@T(In mode) WHEN
(/IMSMODE/ =$Norm$ OR $Iner$)
AND //IMSSCAL// =$Fine$)
@T(In mode) WHEN
(//IMSSCAL// =$Fine$)
X
//IMSSCAL// :=$Fine$
//IMSSCAL// :=$Coarse$
SYST
TPC-23
Path Expression in Initeria Measurement Scale
Calibration
A1
SET-IMSCAL-FINE
IF
(FLIGHT-MODE = *LAUTOCAL* OR
FLIGHT-MODE = *LANDALN* OR
FLIGHT-MODE = *01UPDATE*)
IF ( aT = IN-MODE AN
//IMSCAL// = $COARSES$);
A1
A2
SET-IMSCAL-FINE
IF
SET-IMSCAL-COARSE
SET-IMSCAL-COARSE
C3
IF ( aT = IN-MODE AND
/IMSMODE/ = $GNDAL$ AND
//IMSCAL// = $COARSE$);
C4
IF
IF
(FLIGHT-MODE = *HUDALN*)
(FLIGHT-MODE = *SAUTOCAL* OR
FLIGHT-MODE = *SINSALN* OR
FLIGHT-MODE = *AIRLN*)
C
C1
C2
A1
C2
(FLIGHT-MODE = *HUDALN*)
IF (aT = IN-MODE AND
(/IMSMODE/ = $NORM$ OR
/IMSMODE/ = $INER$) AND
//IMSCAL// = $FINE$)
A2
C1
C3
C6
C4
C5
A1
A2
C3
C5
C6
SYST
TSPC-24
Test Script of Initeria Measurement Scale Calibration
FUNCTION:
CHANGE-SCALE-FACTOR
ASSERT PRE FLIGHT-MODE
SET (*LATUCAL*, *SAUTOCAL*,
*LANDALN*, *SINSALN*, *1OUPDATE*, *HUDALN*,
*AIRALN*, *DIG*, *DI*, *I*);
ASSERT PRE /IMSMODE/ SET ($NORM$, $GNDAL$, $INER$,
$MAGSL$, $GRID$ );
ASSERT PRE //IMSSCAL// SET ($FINE$, $COARSE$);
IF
(FLIGHT – MODE = *LAUTOCAL* OR
FLIGHT – MODE = *LANDALN* OR
FLIGHT – MODE = */1UPDATE*)
IF (//IMSSCAL // = $COARSE$
THEN ASSERT POST //IMSSCAL// = $FINE$;
IF
(FLIGHT – MODE =*HUDALK*)
IF (/IMSMODE/ = $GNDAL$ AND
//IMSSCAL// = $COARSE$
THEN ASSERT POST //IMSSCAL// = $FINE$;
IF
(FLIGHT – MODE =*HUDALKN*)
IF ((/IMSMODE/ = $NORM$ OR
/IMSMODE/ = $INER$) AND
//IMSSCAL// = $FINE$))
THEN ASSERT POST //IMSSCAL// = $COARSE$;
IF
(FLIGHT – MODE = *SAUTOCAL* OR
FLIGHT – MODE = *SINSALN* OR
FLIGHT – MODE = *AIRALN*)
THEN ASSERT POST //IMSSCAL // = $COARSE$;
END CHANGE – SCALE – FACTOR;
SYST
TSPC-25
Test Cases for Initeria Measurement Scale Calibration
Test
Case
TC-1.
TC-2.
TC-3.
TC-4.
TC-5.
TC-6.
TC-7.
TC-8.
TC-9.
Pre Conditions
*LAUTOCAL*
*LANDALN*
*01UPDATE*
*HUDALN*
*HUDALN*
*HUDALN*
*SAUTOCAL*
*SINSALN*
*AIRALN*
$NORMS$
$GNDAL$
$INER$
$GNDAL$
$NORM$
$INER$
$NORN$
$GNDAL$
$INER$
Post Condition
$COARSE$
$COARSE$
$COARSE$
$COARSE$
$FINE$
$FINE$
$FINE$
$FINE$
$FINE$
By comparing these preconditions to be tested against the possible preconditions it will be determined
that there are 10 * 5 * 2 = 100 possible states and that there will be 9 tested giving an input coverage of
only 9 %. However, on the output side there is only one variable //IMSSCAL// and both of its states $COARSE$ and $FINE$ - are achieved. Since there are only two elementary operations within the
function and both are tested, the functional coverage will be 100%.
Assuming that there is a 1: 1 correspondence between specified functions and implemented functions,
this example demonstrates that functional coverage based on the specification is an even weaker
measurement thane branch coverage. Thus, it may be possible to test all functions without testing all
condition outcomes. State coverage is however a much stronger coverage measurement than path
coverage, since there will be an M : 1 relationship between states and paths and it is possible that some
states may not have a corresponding path, as depicted in the example. State testing is really the only
way of detecting errors of omissions.