CSE 5321-001 Assignment 2 solved

$35.00

Category:

Description

5/5 - (1 vote)

1. A tester defined four characteristics based on the input parameter car: Where Made, Energy
Source, Size, and Color. The following partitioning for these characteristics have at least four
mistakes. Correct them. (10 pts.)
Where Made Energy Source Size Color
North America Gas 2-door White
Europe Electric 4-door Silver
Denmark hybrid Hatch back Black
Africa Blue
Hint: each partition must satisfy two properties (Completeness and disjointness).
CSE 5321-001 Assignment 2
2. Answer the following questions for the method search() below: (10 pts.)
a) “Location of element in list” fails the disjointness property. Give an example that illustrates this.
b) “Location of element in list” fails the completeness property. Give an example that illustrates this.
c) Supply one or more new partitions that capture the intent of “Location of e in list” but do not suffer
from completeness or disjointness problems.
3. Derive input space partitioning tests for the GenericStack class with the following method
signatures: (15 pts.)
• public GenericStack ();
• public void Push (Object X);
• public Object Pop ();
• public boolean IsEmt ();
Assume the usual semantics for the stack. Try to keep your partitioning simple, choose a small
number of partitions and blocks
a) Define characteristics of inputs.
b) Partition the characteristics into blocks.
c) Define values for the blocks.
CSE 5321-001 Assignment 2
4. Answer the following questions for the method intersection() below: (15 pts.)
a) Does the partition “Type of s1” satisfy the completeness property? If not, give a value for s1 that
does not fit in any block.
b) Does the partition “Type of s1” satisfy the disjointness property? If not, give a value for s1 that fits
in more than one block.
c) Does the partition “Relation between s1 and s2” satisfy the completeness property? If not, give a
pair of values for s1 and s2 that does not fit in any block.
d) Does the partition “Relation between s1 and s2” satisfy the disjointness property? If not, give a
pair of values for s1 and s2 that fits in more than one block.
e) If the “base choice” criterion were applied to the two partitions (exactly as written), how many test
requirements would result?
5. Derive input space partitioning tests for the BoundedQueue class with the following signature:
(15 pts.)
• public BoundedQueue (int capacity);
• public void Enqueue (Object X);
• public Object Dequeue ();
• public boolean IsEmpty ();
• public boolean IsFull ()
Assume the usual semantics for a queue with a fixed, maximal capacity. Try to keep your partitioning
simple–choose a small number of partitions and blocks.
a) Identify several characteristics that suggest partitions.
b) Identify the blocks in the partition for each characteristic. Designate one block in each partition as
the “Base” block.
c) Define values for the blocks.
d) Define a test set that satisfies base choice coverage (BCC).
CSE 5321-001 Assignment 2
6. Write down all 64 tests to satisfy the All Combinations (ACoC) criterion for the second
categorization of triang()’s inputs in Table 4.2. Use the values in Table 4.3. (15 pts.)
7. Enumerate all 16 tests to satisfy the pair-wise (PWC) criterion for the second categorization of
TriTyp’s inputs in Table 4.2. Use the values in Table 4.3 (use the above tables). (10 pts.)
8. Enumerate all 16 tests to satisfy the multiple base choice (MBCC) criterion for the second
categorization of TriTyp’s inputs in Table 4.2. Use the values in Table 4.3 (use the above tables). (10
pts.)