Sei sulla pagina 1di 6

1. O banca da credite la persoane intre 18 si 64 ani, inclusiv.

Campul de intrare
corespunzator ‘Varsta’ accepta numai numere pozitive, 2 digiti. Care sunt valorile
valide si invalide pentru Equivalence Partitions si Boundary Values?
2. Un camp de intrare accepta valori intregi de la 15000 la 2000000, cel mult 9
digiti. Care sunt valorile valide si invalide pentru Equivalence Partitions si
Boundary Values?
3. Termenul de creditare al unei banci este intre 5 si 30 ani, inclusiv. Care sunt
valorile valide pentru Equivalence Partitions si Boundary Values?
4. Intr-o aplicatie de editare text, marimea fontului acceptata este de la 6 la 72, cu
pasi de 0,5. Care sunt valorile valide si invalide pentru Equivalence Partitions si
Boundary Values?
5. La facultate, se noteaza de la 0 la 75 activitatea de seminar si de la 0 la 25 nota de
examen, apoi se aduna aceste note si se acorda calificative (0-40 respins, 41-60
calificativ C, 60-80 B, respectiv 81-100 A). Care sunt valorile valide si invalide
pentru Equivalence Partitions si Boundary Values pentru a testa calificativul ?
Raspunsuri Black Box
1.
Equivalence Partitioning
Tip Invalid Valid Invalid
Partition Up to 17 18 – 64 65 – 100
Valoare 9 42 82
Rezultat asteptat Rejected Accepted Rejected
Boundary Value Analysis
Tip I V V V V I
Boundary 18 64
Valoare 17 18 19 63 64 65
Rez. asteptat R A A A A R

2.
Equivalence Partitioning
Tip Invalid Valid Invalid
Partitie Up to 15,000 15,000 – 2,000,000 2,000,000 – 999,999,999
Valoare 7,500 1,007,500 500,100,000
Rezultat asteptat Rejected Accepted Rejected
Boundary Value Analysis
Tip I V V V V I
Boundary 15,000 2,000,000
Valoare 14,999 15,000 15,001 1,999,999 2,000,000 2,000,001
Rez. asteptat R A A A A R

3.
Equivalence Partitioning
Tip Valid
Partitie 5 – 30
Valoare 17
Rezultat asteptat Accepted
Boundary Value Analysis
Tip V V V V
Boundary 5 30
Valoare 5 6 29 30
Rez. asteptat A A A A

4.
Equivalence Partitioning
Tip Invalid Valid Invalid
Partitie Up to 5.5 6 – 72 72.5 – ∞
Valoare 3 39 92
Rezultat asteptat Rejected Accepted Rejected
Boundary Value Analysis
Tip I V V V V I
Boundary 6 72
Valoare 5.5 6 6.5 71.5 72 72.5
Rez. asteptat R A A A A R
5.
Equivalence Partitioning
Examen -1 5 10 15 20 30
Seminar -1 15 40 55 70 90
Nota finala -2 20 50 70 90 120
Partitie Total<0 0 – 40 41 – 60 61 – 80 81 – 100 100+
Rez.asteptat Error F C B A Error
Tip I V V V V I
Boundary Value Analysis
Examen -1 0 1 9 10 11 10 11 12 9 10 11
Seminar 0 0 0 30 30 30 30 30 30 50 50 50
Nota finala -1 0 1 39 40 41 40 41 42 59 60 61
Boundary 0 40 41 60
Rez.asteptat Error F F F F C F C C C C B
Tip I V V V V V V V V V V V

Examen 10 11 12 19 20 21 20 21 22 24 25 26
Seminar 50 50 50 60 60 60 60 60 60 75 75 75
Nota finala 60 61 62 79 80 81 80 81 82 99 100 101
Boundary 61 80 81 100
Rez.asteptat C B B B B A B A A A A Error
Tip V V V V V V V V V V V I

Equivalence Partioning Problem


A bank savings account pays a different rate of interest depending on the balance in the
account.
– 3% for balances up to $100
– 5% for balances up to $1000
– 7% for balances over $1000

Equivalence Partition Test Cases:

Exercises
Postal rates for 'light letters' are 25p up to l0g, 35p up to 50g plus an extra l0p for each
additional 25g up to l00g.
Which test inputs (in grams) would be selected using equivalence partitioning?
a. 8,42,82,102
b. 4,15, 65, 92,159
c. 10,50,75,100
d. 5, 20, 40, 60, 80

In a system designed to work out the tax to be paid:


An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these is a valid Boundary Value Analysis test
case?
A £28000.
B £33501.
C £32001.
D £1500.

Given the state diagram, which test case is the minimum series of valid transitions to
cover every state?
a. S S - S 1 - S 2 - S 4 - S 1 - S 3 - ES
b. S S - S 1 - S 2 - S 3 - S 4 - E S
c. S S - S 1 - S 2 - S 4 - S 1 - S 3 - S 4 - S 1 - S 3 - E S
d. S S - S 1 - S 4 - S 2 - S 1 - S 3 - E S
Consider the decision table.
Given this decision table, what is the expected result for the following test cases?
TCI: A 26-year-old on business but with violations or accidents on his driving record
TC2: A 62-year-old tourist with a clean driving record
a. TCI: Don't supply car; TC2: Supply car with premium charge.
b. TCI: Supply car with premium charge; TC2: Supply car with no premium charge.
c. TCI: Don't supply car; TC2: Supply car with no premium charge.
d. TCI: Supply car with premium charge; TC2: Don't supply car.

Potrebbero piacerti anche