Monday, 12 May 2025

Write 4 test cases for ATMs.

 

Write 4 test cases for ATMs.


 Test Case 1: Valid Cash Withdrawal

Test Case ID: ATM_TC_001
Description: Verify that a user can withdraw cash successfully if they have sufficient balance.
Preconditions: The ATM has sufficient cash, and the user has a valid ATM card with a sufficient account balance.
Test Steps:

1.      Insert the ATM card.

2.      Enter the correct PIN.

3.      Select "Withdraw Cash."

4.      Enter an amount within the account balance limit.

5.      Confirm the transaction.
Expected Result: The ATM dispenses the correct amount, deducts it from the account, and prints a receipt (if requested).
Actual Result: The ATM successfully dispensed the cash, updated the account balance, and provided a receipt.

 Test Case Status: Pass

Test Case 2: Insufficient Balance for Withdrawal

Test Case ID: ATM_TC_002
Description: Verify that a withdrawal request is declined if the balance is insufficient.
Preconditions: The ATM is operational, and the user has an ATM card with a balance lower than the requested withdrawal amount.
Test Steps:

1.      Insert the ATM card.

2.      Enter the correct PIN.

3.      Select "Withdraw Cash."

4.      Enter an amount greater than the available balance.

5.      Confirm the transaction.
Expected Result: The ATM displays an error message: "Insufficient Balance," does not dispense cash, and does not deduct the amount.
Actual Result: The ATM displayed an error message and did not dispense cash.
Test Case Status: Pass

 

Test Case 3: Incorrect PIN Entry

Test Case ID: ATM_TC_003
Description: Verify that the system denies access if the wrong PIN is entered multiple times.
Preconditions: The ATM is operational, and the user has a valid ATM card.
Test Steps:

1.      Insert the ATM card.

2.      Enter an incorrect PIN.

3.      Repeat steps 1-2 for three consecutive incorrect attempts.
Expected Result: The ATM locks the account or temporarily blocks further attempts after three incorrect PIN entries.
Actual Result: The ATM displayed a "Card Blocked" message after three incorrect attempts and denied further access.
Test Case Status: Pass

Test Case 4: Card Retention Due to Expired Card

Test Case ID: ATM_TC_004
Description: Verify that the ATM retains an expired card.
Preconditions: The ATM is operational, and the user has an expired ATM card.
Test Steps:

1.      Insert the expired ATM card.

2.      The ATM system checks the card’s expiration date.
Expected Result: The ATM does not proceed with transactions, displays a message ("Card Expired"), and retains the card if applicable.
Actual Result: The ATM displayed a "Card Expired" message but returned the card instead of retaining it.
 Test Case Status: Fail