Creating mobile test scripts to add a nickname to a debit card involves designing test cases that ensure the functionality works as intended across different scenarios. Below are sample test scripts that you can use as a guideline.
Pre-requisites:
- A mobile device (or emulator) with the app installed.
- User account credentials for logging in.
- Debit card linked to the user account.
Test Script for Adding a Nickname to a Debit Card
Test Case 1: Successful Nickname Addition
Objective: Verify that the user can successfully add a nickname to a debit card.
Pre-conditions:
- User is logged in to the app.
- The debit card is already linked to the account.
Steps:
- Open the mobile app.
- Navigate to "Accounts" or "Cards" section from the main menu.
- Select the debit card for which you want to add a nickname.
- Click on the "Edit" or "Add Nickname" option.
- Enter a valid nickname (e.g., "My Spending Card").
- Confirm the action by pressing the "Save" or "Submit" button.
- Verify that a success message appears confirming the nickname has been added.
- Ensure the debit card displays the new nickname in the account details.
Expected Result:
- Nickname is added successfully and displayed on the card.
Test Case 2: Adding Empty Nickname
Objective: Verify that the app handles attempts to add an empty nickname appropriately.
Pre-conditions:
- User is logged in to the app.
- The debit card is already linked to the account.
Steps:
- Open the mobile app.
- Navigate to the "Accounts" or "Cards" section.
- Select the debit card to add a nickname.
- Click on "Edit" or "Add Nickname."
- Leave the nickname field blank.
- Press the "Save" or "Submit" button.
Expected Result:
- An error message appears, indicating that the nickname cannot be empty.
Test Case 3: Adding a Nickname with Special Characters
Objective: Verify that the app restricts the use of special characters in the nickname.
Pre-conditions:
- User is logged in to the app.
- The debit card is already linked to the account.
Steps:
- Open the mobile app.
- Navigate to the "Accounts" or "Cards" section.
- Select the debit card.
- Click on "Edit" or "Add Nickname."
- Enter a nickname with special characters (e.g., "My@Card!").
- Press the "Save" or "Submit" button.
Expected Result:
- An error message appears, indicating that special characters are not allowed.
Test Case 4: Verify Nickname Character Limit
Objective: Ensure that the nickname field enforces character limits.
Pre-conditions:
- User is logged in to the app.
- The debit card is already linked to the account.
Steps:
- Open the mobile app.
- Navigate to the "Accounts" or "Cards" section.
- Select the debit card.
- Click on "Edit" or "Add Nickname."
- Enter a nickname exceeding the maximum character limit (e.g., 50 characters).
- Press the "Save" or "Submit" button.
Expected Result:
- An error message appears indicating that the nickname exceeds the character limit.
Test Case 5: Edit Existing Nickname
Objective: Verify that the user can edit an existing nickname for the debit card.
Pre-conditions:
- User is logged in to the app.
- A nickname is already set for the debit card.
Steps:
- Open the mobile app.
- Navigate to the "Accounts" or "Cards" section.
- Select the debit card with the existing nickname.
- Click on "Edit" or "Change Nickname."
- Change the nickname to a new valid nickname (e.g., "My Travel Card").
- Press the "Save" or "Submit" button.
Expected Result:
- The existing nickname is updated successfully, and a success message is displayed.
Notes:
- Always test these cases on different devices and operating systems if applicable.
- Ensure to test the app behavior with different network conditions as well.
- The test case IDs can be structured according to your testing framework for easy tracking.
By following these test scripts, you will be able to confirm that the process for adding a nickname to a debit card functions correctly and is user-friendly.