Docsity

Partition Testing and Random Testing - Lecture Notes | CSE 565, Study notes of Computer Science

Toggle sidebar
bg1
Class Notes CSE 565: September 10th
W. T. Tsai
Department of Computer Science and Engineering
Arizona State University
Tempe, AZ 85287
Sept. 10th, 2007
Today’s Focus: Partition Testing and Random testing
What’s in partition testing?
Partition testing usually means partition of input (not output) space of a program. An
input domain can be sets, sequences, sets of sequences, real numbers, whole numbers,
or a combination of them.
Sets {x| x is an undergraduate student}
Sequences {1,3,5,7,9… }
{2,4,6,8,10…}
{2,3,5,7,11,...}
Operators U, n, ~, cat(used in sequences)…
A partition is not that simple, it can include the combination of the sets and sequences or the sets
of sets. So, the partition of input domain can be complicated, thus, many points need to be selected
for testing the SUT.
Example: partition of testing in Bank account
Sets: Types of accounts
Sets: Types of Transactions:
¾ With draw
¾ Deposit
¾ Check
¾ Transfer
¾ Close
¾ Open
Sequence:
Such as choose 5 of the transaction in set “type of transaction”, the number of testing sequence
can be 6*6*6*6*6
** There might be some impossible sequences; such as if one closes the account in the first step,
then many other possibilities might not need to be tested any more.
How to do partition testing?
To do partition in test need to follow the three steps:
Sets of sets,
Sets of sequences
pf3

Partial preview of the text

Download Partition Testing and Random Testing - Lecture Notes | CSE 565 and more Study notes Computer Science in PDF only on Docsity!

Class Notes CSE 565: September 10 th

W. T. Tsai

Department of Computer Science and Engineering

Arizona State University

Tempe, AZ 85287

Sept. 10th, 2007

Today’s Focus: Partition Testing and Random testing

What’s in partition testing?

Partition testing usually means partition of input (not output) space of a program. An

input domain can be sets, sequences, sets of sequences, real numbers, whole numbers,

or a combination of them.

Sets {x| x is an undergraduate student} Sequences {1,3,5,7,9… } {2,4,6,8,10…} {2,3,5,7,11,...}

Operators U, n , ~, cat(used in sequences)…

A partition is not that simple, it can include the combination of the sets and sequences or the sets of sets. So, the partition of input domain can be complicated, thus, many points need to be selected for testing the SUT.

Example: partition of testing in Bank account

Sets : Types of accounts Sets : Types of Transactions: ¾ Withdraw ¾ Deposit ¾ Check ¾ Transfer ¾ Close ¾ Open Sequence: Such as choose 5 of the transaction in set “type of transaction”, the number of testing sequence can be 6666

** There might be some impossible sequences; such as if one closes the account in the first step, then many other possibilities might not need to be tested any more.

How to do partition testing?

To do partition in test need to follow the three steps:

Sets of sets, Sets of sequences

  1. Select points near intersection;
  2. Select points on the line;
  3. Select random test within a partitioned area.

`

Comparison of Random Testing and Partition testing

When is the Random testing effective? Example: suppose probability of the testing point that will fall into the following areas is even.

We will find that the random testing in the first diagram will be much more effective than the latter one. The random testing is only more effective when a SUT is in the balanced and structured manner. Partition testing will be more effective in the latter diagram.

Will the partition testing always useful?

Too much boundary in the SUT may result in too much testing effort. Sometimes, too much partition is not necessarily helpful, so a wise partition is important for the partition testing.

An Example to do partition

for ( k-=0; k<10000; k++){ Do Something (k); }

Intersection Dot along the line Random Dot

Effective Ineffective