- Write four test cases for payment through a debit card option for an interactive web app, considering various positive and negative scenarios
write-four-test-cases-for-payment - Test Case ID: TC001
- Scenario: Successful payment with valid card details.
- Test Steps:
1. Navigate to the payment page.
2. Select the "Debit Card" payment option.
3. Enter valid debit card details:
§ Card Number: 16 digits
§ Expiry Date: Future date
§ CVV: 3 digits
4. Click "Pay Now."
- Expected Result:-Payment is processed successfully, and the user is redirected to the order confirmation page. A success message is displayed, and a confirmation email is sent to the user.
Test Case 2: Invalid Card Number (Negative Scenario)
- Test Case ID: TC002
- Scenario: Payment with an invalid card number.
- Test Steps:
1. Navigate to the payment page.
2. Select the "Debit Card" payment option.
3. Enter invalid debit card details:
§ Card Number: Less than 16 digits or contains alphabets/special characters
§ Expiry Date: Future date
§ CVV: 3 digits
4. Click "Pay Now."
- Expected Result:-Payment is not processed. An error message such as "Invalid card number. Please check and try again" is displayed.
Test Case 3: Expired Card (Negative Scenario)
- Test Case ID: TC_DebitCard_003
- Scenario: Payment with an expired debit card.
- Test Steps:
1. Navigate to the payment page.
2. Select the "Debit Card" payment option.
3. Enter debit card details:
§ Card Number: 16 digits
§ Expiry Date: Past date
§ CVV: 3 digits
4. Click "Pay Now."
- Expected Result:-Payment is not processed. An error message such as "Card has expired. Please use a valid card" is displayed.
Test Case 4: Insufficient Funds (Negative Scenario)
- Test Case ID: TC_DebitCard_004
- Scenario: Payment with a valid card but insufficient account balance.
- Test Steps:
1. Navigate to the payment page.
2. Select the "Debit Card" payment option.
3. Enter valid debit card details:
§ Card Number: 16 digits
§ Expiry Date: Future date
§ CVV: 3 digits
4. Ensure the account associated with the card has insufficient funds.
5. Click "Pay Now."
- Expected Result:-Payment is not processed. An error message such as "Transaction declined due to insufficient funds" is displayed.