What is Test Case Development ?
The Test Case Development phase is a crucial stage in the Software Testing Life Cycle (STLC). It involves creating detailed test cases that will be used to verify whether the software meets the specified requirements and functions as expected. This phase ensures that all aspects of the software are thoroughly tested, including functionality, performance, security, and usability.
Key Activities in Test Case Development
1. Analyze Requirements
Objective: Understand the banking application’s requirements and identify what needs to be tested.
Example:
Review the Software Requirements Specification (SRS) for features like login, fund transfer, balance inquiry, transaction history, etc.
Understand specific rules, such as:
- A user cannot transfer more than their available balance.
- The system should lock an account after 3 failed login attempts.
- Notifications should be sent for every transaction.
2. Identify Test Scenarios
Objective: Break down the requirements into testable scenarios.
Example:
For the login functionality, scenarios could include:
- Successful login with valid credentials.
- Login failure with invalid credentials.
- Account lock after multiple failed attempts.
For the fund transfer functionality, scenarios could include:
- Successful fund transfer to a valid account.
- Fund transfer failure due to insufficient balance.
- Fund transfer failure due to invalid beneficiary account.
3. Write Test Cases
Objective: Create detailed test cases for each scenario.
Example:
Test Case for Successful Login:
Test Case ID: TC_LOGIN_001
Test Description: Verify that a user can log in with valid credentials.
Preconditions: User must have a registered account.
Test Steps:
- Open the banking application.
- Enter valid username and password.
- Click the “Login” button.
Test Data: Username = “user123”, Password = “Pass@123”
Expected Result: User is redirected to the dashboard.
Actual Result: (To be filled during execution)
Status: (To be filled during execution)
Test Case for Fund Transfer:
- Test Case ID: TC_FUND_TRANSFER_001
- Test Description: Verify that a user can transfer funds to another account.
- Preconditions: Sufficient balance in the user’s account.
- Test Steps:
- Log in to the application.
- Navigate to the “Fund Transfer” section.
- Enter beneficiary account number, amount, and remarks.
- Confirm the transaction.
- Test Data: Beneficiary Account = “987654321”, Amount = “1000”, Remarks = “Test Transfer”
- Expected Result: Funds are successfully transferred, and the transaction is reflected in the account statement.
- Actual Result: (To be filled during execution)
- Status: (To be filled during execution)
4. Review Test Cases
Objective: Ensure the test cases are accurate, complete, and aligned with the requirements.
Example:
- Conduct a peer review of the test cases for the fund transfer feature.
- Verify that all scenarios (e.g., valid transfer, insufficient balance, invalid account) are covered.
- Check for clarity, correctness, and completeness of steps and expected results.
5. Organize Test Cases
Objective: Group and prioritize test cases for efficient execution.
Example:
Group test cases by functionality:
- Login: TC_LOGIN_001, TC_LOGIN_002, TC_LOGIN_003
- Fund Transfer: TC_FUND_TRANSFER_001, TC_FUND_TRANSFER_002
- Balance Inquiry: TC_BALANCE_001
Prioritize test cases based on criticality:
- High priority: Login, Fund Transfer
- Medium priority: Balance Inquiry, Transaction History
- Low priority: Change Password
6. Prepare Test Data
Objective: Create or gather the data required to execute the test cases.
Example:
For login:
- Valid credentials: Username = “user123”, Password = “Pass@123”
- Invalid credentials: Username = “user123”, Password = “WrongPass”
For fund transfer:
- Beneficiary account: “987654321”
- Amounts: “1000” (valid), “50000” (insufficient balance)
For account lock:
- Simulate 3 failed login attempts.
7. Link Test Cases to Requirements
Objective: Ensure traceability between test cases and requirements.
Example:
- Use a Traceability Matrix to map test cases to requirements:
- Requirement ID: REQ_LOGIN_001
Test Case ID: TC_LOGIN_001, TC_LOGIN_002
- Requirement ID: REQ_FUND_TRANSFER_001
- Test Case ID: TC_FUND_TRANSFER_001, TC_FUND_TRANSFER_002
8. Validate Test Coverage
Objective: Ensure all requirements are covered by test cases.
Example:
- Verify that all login-related requirements (e.g., successful login, invalid login, account lock) are covered.
- Ensure all fund transfer scenarios (e.g., valid transfer, insufficient balance, invalid account) are included.
Deliverables of the Test Case Development Phase:
- Test Cases Document:Detailed test cases for all functionalities (e.g., login, fund transfer, balance inquiry).
- Test Data:Data required for executing the test cases.
- Traceability Matrix:Mapping of test cases to requirements.
Example of a Test Case Document for Banking Application:
Test Case ID | Test Description | Preconditions | Test Steps | Test Data | Expected Result | Actual Result | Status |
TC_LOGIN_001 | Successful Login | Valid account exists | 1. Enter valid username and password.2. Click “Login”. | Username = “user123”, Password = “Pass@123” | User is redirected to the dashboard. | ||
TC_FUND_TRANSFER_001 | Successful Fund Transfer | Sufficient balance | 1. Log in.2. Navigate to “Fund Transfer”.3. Enter beneficiary details.4. Confirm. | Beneficiary = “987654321”, Amount = “1000” | Funds transferred successfully. | ||
TC_LOGIN_002 | Invalid Login Attempt | Valid account exists | 1. Enter invalid username or password.2. Click “Login”. | Username = “user123”, Password = “WrongPass” | Error message “Invalid credentials”. |
Objectives of the Test Case Development Phase:
- Ensure comprehensive test coverage for all requirements.
- Provide clear and detailed instructions for test execution.
- Facilitate efficient and effective testing by testers.
- Serve as documentation for future reference and regression testing.
Importance of the Test Case Development Phase:
- Helps in identifying defects early in the development cycle.
- Ensures that the software meets the specified requirements.
- Provides a structured approach to testing, improving efficiency and effectiveness.
- Acts as a reference for future testing cycles and regression testing.