Daripada Anas bin Malik r.a meriwayatkan bahawa Rasulullah s.a.w bersabda: "Menuntut ilmu adalah fardu atas setiap orang Islam dan penuntut ilmu akan didoakan keampunan oleh semua termasuk ikan-ikan di lautan".

Subscibe to me

Wednesday 6 September 2017

STQA - Equivalence Partitioning, Boundary Value Analysis, Decision Table




How to do Equivalence Partitioning, Boundary Value Analysis, and Decision table?


TRANSFER

For example, CIMBClick system has a transfer function. The inputs are an amount of money, account number, and TAC code. So, for the amount of money, there is a limitation which it could not be transferred and invalid input. The same thing for an account number and TAC code. The valid for account number is only ten pin number. More than that, it considered invalid.

Amount of money
                                    0  Invalid                       1                 Valid                     20500                 Invalid
                        
Account number
                                   0     Invalid                     10                Valid                        11                     Invalid


TAC code                  6    Valid                           7                      Invalid



Total input & invalid input = 3*3*2  
                                               = 18

Note : 
3 column - amount of money
3 column - account number
2 column - TAC code

Then, here is the example of valid and invalid inputs :

PARAMETER
VALID
INVALID
Amount of Money
12
0.5, 20500
Account Number
10
8, 13
TAC Code
6
14






EQUIVALENCE PARTITIONING TEST CONDITION AND COVERAGE


TEST CASE
TEST CONDITION
TEST COVERAGE
AMOUNT OF MONEY
ACCOUNT NUMBER
TAC CODE
1
Amount of Money =12, Account Number=10
Valid
12
1234567891

2
Amount of Money= 12, TAC Code= 6
Valid
12

123456
3
Amount of Money =12, Account Number=8
Invalid
12
12345678

4
Amount of Money=12, Account Number=13
Invalid
12
1234567891234

5
Amount of Money=12, TAC Code= 14
Invalid
12

12345678912345
6
Account Number= 10, Amount of Money=0.5
Invalid
0.5
1234567891

7
Account Number= 10, Amount of Money=20,000
Invalid
20,000
1234567891

8
Account Number= 10,
TAC Code=14
Invalid

1234567891
12345678912345
9
TAC Code= 6,
Amount of Money=0.5
Invalid
0.5

123456
10
TAC Code= 6,
Amount of Money=20,000
Invalid
20,000

123456
11
TAC Code= 6,
Account Number=8
Invalid

12345678
123456
12
TAC Code= 6,
Account Number=13
Invalid

1234567891234
123456
13
Amount of Money=0.5,
Account Number=8
Invalid
0.5
12345678

14
Amount of Money=0.5,
Account Number=13
Invalid
0.5
1234567891234

15
Amount of Money=0.5,
TAC Code=14
Invalid
0.5

12345678912345
16
Amount of Money=20,000,
Account Number=8
Invalid
20,000
12345678

17
Amount of Money=20,000,
Account Number=13
Invalid
20,000
1234567891234

18
Amount of Money=20,000,
TAC Code=14
Invalid
20,000

12345678912345

BOUNDARY VALUE ANALYSIS TEST CONDITION AND COVERAGE
Amount of Money
TEST CONDITION
TEST COVERAGE
EXAMPLE OF TEST DATA
Amount of Money = 0
Invalid
No input
Amount of Money = 0.5
Invalid
0.5
Amount of Money = 1
Valid
1
Amount of Money = 20,000
Valid
20,000
Amount of Money = 20,500
Invalid
20,500
Amount of Money = 21,000
Invalid
21,000


Account Number
TEST CONDITION
TEST COVERAGE
EXAMPLE OF TEST DATA
Account Number = 0
Invalid
No input
Account Number = 9
Invalid
123456789
Account Number = 10
Valid
1234567891
Account Number = 12
Valid
123456789123
Account Number = 13
Invalid
1234567891234
Account Number = 15
Invalid
123456789123456
Valid Account Number
Valid
1234567891
Invalid Account Number
Invalid
1987654321


TAC Code
TEST CONDITION
TEST COVERAGE
EXAMPLE OF TEST DATA
TAC Code = 0
Invalid
No input
TAC Code = 5
Invalid
12345
TAC Code = 6
Valid
123456
TAC Code = 12
Valid
123456789123
Valid Account Number
Valid
123456
Invalid Account Number
Invalid
654321




Decision Table

Basically, the positive and negative is the action encountered when the input is valid. What are the expectations going to happen? Example actions for the valid amount of money, valid account number and valid TAC code as follows :


DECISION TABLE
POSITIVE
NEGATIVE
Valid Amount of Money
Proceed to amount of money to transfer
Try again <= 3
Valid Account Number
Proceed to request TAC code
Reject transaction
Valid TAC Code
Process transfer
Wait for users



Valid Amount of Money
N
N
N
N
Y
Y
Y
Y
Valid Account Number
N
N
Y
Y
N
N
Y
Y
Valid TAC Code
N
Y
Y
Y
N
Y
N
Y
Proceed to amount of money to transfer
-
-
-
-
X
X
X
X
Try again <= 3
X
X
X
-
-
-
-
-
Proceed to request TAC code
-
-
-
-
-
-
X
X
Reject transaction
X
X
X
X
X
X
-
-
Process transfer
-
-
-
-
-
-
X
X
Wait for users
-
-
-
-
X
-
X
-

As there are redundancies between the column, so removed them. The results are as follows :

Valid Amount of Money
N
N
Y
Y
Y
Y
Valid Account Number
Y
Y
N
N
Y
Y
Valid TAC Code
Y
Y
N
Y
N
Y
Proceed to amount of money to transfer
-
-
X
X
X
X
Try again <= 3
X
-
-
-
-
-
Proceed to request TAC code
-
-
-
-
X
X
Reject transaction
X
X
X
X
-
-
Process transfer
-
-
-
-
X
X
Wait for users
-
-
X
-
X
-





USE CASE DESCRIPTION
USE CASE ID
001
VERSION
1.0
USE CASE
Transfer
PURPOSE
To allow users to perform a transfer between accounts.
ACTOR
User
TRIGGER
User choose ‘Transfer’ in the Transaction Menu
PRECONDITION
CimbClick System is ‘On’ and at Transaction Menu
SCENARIO NAME
STEP
ACTION
MAIN FLOW
1
User choose ‘Transfer’ in Transaction Menu

2
System request for type of account to transfer from.

3
User choose valid type of account to transfer from.

4
System verifies of account to transfer from.

5
System request for type of account to transfer into.

6
User choose valid type of account to transfer into.

7
System verifies type of account to transfer into.

8
System request for amount to transfer.

9
User enter valid amount to transfer.

10
System verifies amount to transfer in account.

11
System request for TAC Code.

12
User enter valid TAC Code.

13
System verifies TAC Code.

14
System records in log and print

15
System ask whether user want to perform another transaction.

16
User choose ‘No’

17
System terminates session and cancel transaction.

18
System is showing ‘Home’ Page.
ALTERNATIVE FLOW- INVALID ACCOUNT TYPE (FROM)
3.1.1
User choose invalid type of account to transfer from.
3.1.2
Back to Main Flow Step 2 (System request for type of account to transfer from)
ALTERNATIVE FLOW- CANCEL TRANSFER AT ACCOUNT TYPE SELECTION(FROM)
3.2.1
Users press ‘Cancel’ button.
3.2.2
Back to Main Flow 15 (System ask whether user want to perform another transaction)
ALTERNATIVE FLOW- INVALID ACCOUNT TYPE (TO)
3.3.1
User choose invalid type of account to transfer to.
3.3.2
Back to Main Flow 5 (System request for type of account to transfer into)
ALTERNATIVE FLOW- CANCEL TRANSFER AT ACCOUNT TYPE SELECTION(TO)
3.4.1
Users press ‘Cancel’ button.
3.4.2
Back to Main Flow 15 (System ask whether user want to perform another transaction)
ALTERNATIVE FLOW- INVALID TRANSFER AMOUNT (AMOUNT MORE THAN ACCOUNT BALANCE)
3.5.1
User input invalid amount of transfer.
3.5.2
System display error message ‘Insufficient balance in account’
3.5.3
Back to Main Flow 15 (System ask whether user want to perform another transaction)
ALTERNATIVE FLOW- CANCEL WHEN ENTERING TRANSFER AMOUNT
3.6.1
Users press ‘Cancel’ button.
3.6.2
Back to Main Flow 15 (System ask whether user want to perform another transaction)
ALTERNATIVE FLOW- PERFORM ANOTHER TRANSACTION
3.7.1
User choose ‘Yes’
3.7.2
System display the transaction menu and wait for user’s transaction request.
RULES
            i.            Minimum amount of transfer is RM1.00
            ii.            Maximum amount of transfer is RM20,000
AUTHOR
Mrs Blala