How to Write Test Cases for Contact List (With Examples)
Writing effective test cases for a contact list feature is crucial for ensuring a robust and user-friendly application. A well-defined set of test cases goes beyond simple "add contact" and "view cont
# How to Write Test Cases for Contact List (With Examples)
Writing effective test cases for a contact list feature is crucial for ensuring a robust and user-friendly application. A well-defined set of test cases goes beyond simple "add contact" and "view contact" scenarios, encompassing a wide range of positive, negative, edge, and boundary conditions that mimic real-world user interactions and potential system failures. This guide will walk you through the process of crafting high-signal test cases for contact lists, providing concrete examples and a structured approach that can be applied to any platform – mobile, web, or desktop. We'll cover the anatomy of a good test case, explore different testing types, and demonstrate how to create a comprehensive test matrix. We'll also touch upon data setup, prioritization, traceability, and the complementary role of autonomous testing in achieving complete coverage.
The primary goal when writing test cases for a contact list is to validate its core functionalities, data integrity, user experience, and resilience under various conditions. This includes ensuring contacts can be added, edited, deleted, searched, and displayed accurately, while also accounting for unique scenarios like duplicate entries, special characters in names, and varying data formats. By following a systematic approach, you can build confidence in the quality of your contact list feature.
The Anatomy of a High-Signal Test Case
A high-signal test case is one that, when executed, provides meaningful information about the system's behavior. It's specific, unambiguous, and designed to isolate a particular aspect of functionality or a potential defect. For a contact list, each test case should have a clear structure to ensure reproducibility and accurate reporting.
Essential Components of a Test Case
Every well-formed test case, regardless of the feature, typically includes the following elements:
- Test Case ID: A unique identifier for easy referencing and tracking. This is crucial for reporting and linking to requirements or defects.
- Test Case Title/Summary: A concise description of what the test case is intended to verify. It should be descriptive enough for someone to understand the test's purpose at a glance.
- Requirement ID (Traceability): Links the test case back to the specific functional or non-functional requirement it validates. This ensures that all requirements are tested and provides a clear audit trail.
- Preconditions: Any conditions that must be met *before* executing the test steps. This might include having a specific number of contacts already in the list, being logged into an account, or having certain permissions.
- Test Steps: A numbered, sequential list of actions to perform. These steps should be granular and precise, leaving no room for interpretation.
- Test Data: The specific data values to be used during the test steps. This is particularly important for contact lists, where names, phone numbers, emails, and addresses can vary significantly.
- Expected Result: A clear, objective description of what the system *should* do or display after the test steps are executed. This is the benchmark against which the actual result is compared.
- Actual Result: (Filled in during execution) A record of what the system *actually* did or displayed.
- Status: (Filled in during execution) Pass, Fail, Blocked, or Skipped.
- Postconditions: (Optional but useful) Conditions that should exist *after* the test has been successfully executed. This can be helpful for setting up subsequent tests.
Example: Basic Contact Creation
Let's illustrate with a simple example for adding a contact:
- Test Case ID: TC_CL_ADD_001
- Test Case Title: Verify successful addition of a new contact with valid details.
- Requirement ID: REQ_CL_ADD_01
- Preconditions: User is logged into the application. The contact list is empty or contains existing contacts.
- Test Steps:
- Navigate to the "Add New Contact" screen.
- Enter "John" into the "First Name" field.
- Enter "Doe" into the "Last Name" field.
- Enter "123-456-7890" into the "Phone Number" field.
- Enter "john.doe@example.com" into the "Email" field.
- Tap the "Save" button.
- Test Data:
- First Name: John
- Last Name: Doe
- Phone Number: 123-456-7890
- Email: john.doe@example.com
- Expected Result: A confirmation message is displayed (e.g., "Contact saved successfully"). The newly added contact ("John Doe") appears in the contact list, and their details match the entered information when viewed.
This structured approach ensures clarity and repeatability, which are fundamental to effective testing.
Types of Test Cases for Contact Lists
To achieve comprehensive coverage, test cases should be designed to cover various testing types. For a contact list, this involves not only verifying that expected actions work (positive testing) but also exploring how the system behaves when given invalid or unexpected input (negative testing) and examining the limits of its capabilities (boundary and edge case testing).
Positive Test Cases
These tests verify that the application functions correctly under normal, expected conditions. They confirm that the primary features work as intended.
- Adding a Contact: Verifying basic contact creation with all required fields populated.
- Editing a Contact: Ensuring that existing contact details can be modified and saved correctly.
- Deleting a Contact: Confirming that contacts can be removed from the list.
- Viewing Contact Details: Checking that all saved details for a contact are displayed accurately.
- Searching Contacts: Validating that the search function returns relevant results based on name, phone number, or email.
- Sorting Contacts: Testing different sorting orders (e.g., alphabetical by first name, last name).
Negative Test Cases
Negative tests are designed to uncover defects by providing invalid, unexpected, or malformed data, or by performing actions in an incorrect sequence.
- Adding a Contact with Missing Required Fields: What happens if the user tries to save a contact without a first name or phone number (if these are mandatory)?
- Entering Invalid Data Formats: Using incorrect formats for phone numbers, emails, or zip codes.
- Attempting to Save Duplicate Contacts: How does the system handle attempts to add a contact that already exists? Does it prevent duplicates, allow them, or flag them?
- Deleting a Non-Existent Contact: While less likely in a UI, this is relevant if the API is called directly.
- Searching with No Matches: Verifying that an appropriate message is shown when no contacts match the search query.
Edge and Boundary Cases
Edge cases occur in unusual circumstances, often at the extremes of valid input ranges or in specific system states. Boundary cases specifically test values at the limits of acceptable input.
- Special Characters in Names/Fields: Testing names with hyphens, apostrophes, accents, or non-Latin characters. What about very long names or names exceeding a certain character limit?
- Extremely Long Data: Entering very long strings into name, address, or notes fields to check for truncation or buffer overflows.
- Empty Fields: What happens when optional fields are left blank?
- Maximum Number of Contacts: If there's a limit to the number of contacts, testing at that limit and just beyond.
- Data Formats: Testing variations in phone number formats (e.g., with country codes, extensions, different spacing) or email formats.
- Concurrency Issues: If multiple users can access the same contact list (e.g., in a shared contact system), testing simultaneous edits or deletions.
User Experience and Accessibility Test Cases
Beyond functional correctness, it's vital to test the user experience and ensure the application is accessible to all users.
- UI Responsiveness: How does the contact list and its features perform on different screen sizes and orientations?
- Navigation: Is it easy to find contacts, add new ones, edit, or delete them?
- Error Handling: Are error messages clear and helpful?
- Accessibility: For users with disabilities, are the contact list elements navigable via screen readers? Are color contrasts sufficient? Can elements be resized? (e.g., WCAG compliance).
- Performance: How quickly does the contact list load, especially with a large number of contacts? How fast is the search?
Designing a Comprehensive Test Matrix for Contact Lists
A test matrix is a table that maps test cases to requirements, features, or test types. It provides a high-level overview of the testing effort and helps ensure that all critical areas are covered. For a contact list, a well-designed matrix can be an invaluable tool.
Elements of a Contact List Test Matrix
A typical test matrix for a contact list might include the following columns:
- Test Case ID: Unique identifier.
- Feature Area: The specific part of the contact list functionality being tested (e.g., Add Contact, Edit Contact, Search, View Details).
- Test Type: Positive, Negative, Edge, Boundary, UI, Accessibility, Performance.
- Requirement ID: Traceability to requirements.
- Test Case Summary: Brief description of the test.
- Priority: High, Medium, Low, indicating the importance of the test.
- Status: Pass/Fail/Blocked/Skipped (during execution).
- Notes/Defect ID: Any relevant observations or links to reported defects.
Example Contact List Test Matrix
Here is a sample test matrix demonstrating various test cases for a contact list feature. This matrix focuses on key functionalities and scenarios.
| Test Case ID | Feature Area | Test Type | Requirement ID | Test Case Summary | Priority | Status | Notes/Defect ID |
|---|---|---|---|---|---|---|---|
| TC_CL_ADD_001 | Add Contact | Positive | REQ_CL_ADD_01 | Verify successful addition of a new contact with valid details. | High | ||
| TC_CL_ADD_002 | Add Contact | Negative | REQ_CL_ADD_02 | Attempt to add contact with missing mandatory "First Name". | High | ||
| TC_CL_ADD_003 | Add Contact | Negative | REQ_CL_ADD_03 | Attempt to add contact with invalid "Email" format. | Medium | ||
| TC_CL_ADD_004 | Add Contact | Edge | REQ_CL_ADD_04 | Add contact with special characters in "First Name" (e.g., O'Malley). | Medium | ||
| TC_CL_ADD_005 | Add Contact | Edge | REQ_CL_ADD_05 | Add contact with a very long "First Name" (e.g., 100+ chars). | Low | ||
| TC_CL_ADD_006 | Add Contact | Boundary | REQ_CL_ADD_06 | Add contact with only required fields populated. | High | ||
| TC_CL_EDIT_001 | Edit Contact | Positive | REQ_CL_EDIT_01 | Verify successful editing of an existing contact's phone number. | High | ||
| TC_CL_EDIT_002 | Edit Contact | Positive | REQ_CL_EDIT_02 | Verify editing multiple fields of an existing contact. | High | ||
| TC_CL_EDIT_003 | Edit Contact | Negative | REQ_CL_EDIT_03 | Attempt to save contact edits with invalid "Email" format. | Medium | ||
| TC_CL_EDIT_004 | Edit Contact | Edge | REQ_CL_EDIT_04 | Edit a contact to have an empty "Last Name". | Medium | ||
| TC_CL_DEL_001 | Delete Contact | Positive | REQ_CL_DEL_01 | Verify successful deletion of a contact. | High | ||
| TC_CL_DEL_002 | Delete Contact | Negative | REQ_CL_DEL_02 | Attempt to delete a contact that does not exist. | Low | ||
| TC_CL_SEARCH_001 | Search Contact | Positive | REQ_CL_SCH_01 | Search for a contact by exact "First Name". | High | ||
| TC_CL_SEARCH_002 | Search Contact | Positive | REQ_CL_SCH_02 | Search for a contact by partial "Last Name". | High | ||
| TC_CL_SEARCH_003 | Search Contact | Positive | REQ_CL_SCH_03 | Search for a contact by "Email" address. | High | ||
| TC_CL_SEARCH_004 | Search Contact | Negative | REQ_CL_SCH_04 | Search for a contact with a query that yields no results. | Medium | ||
| TC_CL_SEARCH_005 | Search Contact | Edge | REQ_CL_SCH_05 | Search for contacts with names containing special characters. | Medium | ||
| TC_CL_VIEW_001 | View Contact | Positive | REQ_CL_VIEW_01 | Verify all fields are displayed correctly for a contact. | High | ||
| TC_CL_SORT_001 | Sort Contacts | Positive | REQ_CL_SORT_01 | Verify contacts are sorted alphabetically by "Last Name". | High | ||
| TC_CL_SORT_002 | Sort Contacts | Positive | REQ_CL_SORT_02 | Verify contacts are sorted alphabetically by "First Name". | High | ||
| TC_CL_ACC_001 | Accessibility | Accessibility | REQ_ACC_01 | Verify contact list is navigable using screen reader. | High | ||
| TC_CL_PERF_001 | Performance | Performance | REQ_PERF_01 | Measure load time for contact list with 1000 contacts. | Medium |
This matrix provides a structured way to plan and track testing. The "Priority" column helps in deciding which tests to execute first, especially under time constraints.
Data Setup and Management for Contact List Testing
The effectiveness of test cases for a contact list is heavily dependent on the quality and variety of test data used. Without appropriate data, even the most meticulously crafted test cases may fail to uncover critical defects.
Strategies for Test Data Generation
- Manual Data Creation: For smaller, highly specific test cases, manually entering data can be efficient. This is suitable for edge cases or complex scenarios that are hard to automate.
- *Example:* Manually creating a contact with a name like "Dr. Anya Sharma-Jones, Esq." to test special characters, titles, and multi-part last names.
- Data Generation Tools: For larger datasets or repetitive tasks, using data generation tools or scripts can save significant time. These tools can create realistic-looking names, addresses, phone numbers, and emails.
- *Example:* Using a Python script with the
Fakerlibrary to generate 100 unique contacts with varying first names, last names, and email addresses. - Data Masking/Anonymization: If using production data for testing, it's critical to mask or anonymize sensitive information (like real names, phone numbers, addresses) to comply with privacy regulations (e.g., GDPR, CCPA). Dummy or synthetic data is often preferred for privacy and ethical reasons.
- Data Variety: Ensure your test data covers a wide spectrum:
- Names: Short, long, with spaces, hyphens, apostrophes, accents, numbers, and non-ASCII characters.
- Phone Numbers: Local formats, international formats, with extensions, spaces, parentheses, and missing digits.
- Email Addresses: Valid formats, invalid formats, common domains, custom domains.
- Addresses: Different lengths, street types, city/state/zip code variations.
- Notes/Descriptions: Empty, short, long, with special characters.
Managing Test Data for Different Scenarios
- Baseline Data: Maintain a set of "baseline" contacts that are used for recurring tests. This ensures consistency across test runs.
- Scenario-Specific Data: For specific test scenarios (e.g., testing duplicates, testing search with specific keywords), prepare data that directly supports those tests.
- Data Cleanup: After tests that modify data (add, edit, delete), ensure the environment is reset or data is cleaned up to prevent interference with subsequent test runs. This is particularly important for automated tests.
- Data for Performance Tests: For performance testing, you'll need a large volume of data. This could involve generating thousands or even millions of contacts to simulate a production environment.
Example Python Snippet for Data Generation (using Faker):
from faker import Faker
import random
fake = Faker()
def generate_contact_data(num_contacts=1):
contacts = []
for _ in range(num_contacts):
first_name = fake.first_name()
last_name = fake.last_name()
phone_number = fake.phone_number()
email = fake.email()
contact = {
"first_name": first_name,
"last_name": last_name,
"phone_number": phone_number,
"email": email,
"notes": fake.text(max_nb_chars=100)
}
contacts.append(contact)
return contacts
# Generate 5 sample contacts
sample_contacts = generate_contact_data(5)
for contact in sample_contacts:
print(contact)
# Example of generating data with specific constraints
def generate_complex_contact():
first_name = fake.first_name() + random.choice(["", "-Jones", "'Smith", " O'Malley"])
last_name = fake.last_name()
phone_number = f"{random.randint(100, 999)}-{random.randint(100, 999)}-{random.randint(1000, 9999)}"
email = f"{first_name.lower()}.{last_name.lower()}@{random.choice(['example.com', 'mail.net', 'service.org'])}"
return {
"first_name": first_name,
"last_name": last_name,
"phone_number": phone_number,
"email": email
}
complex_contact = generate_complex_contact()
print("\nComplex contact example:", complex_contact)
This example illustrates how to programmatically generate varied and realistic contact data, which is essential for thorough testing.
Prioritization and Traceability of Test Cases
Not all test cases are created equal. Prioritization helps focus testing efforts on the most critical functionalities, ensuring that the core features are stable. Traceability ensures that every requirement is covered by at least one test case.
Prioritizing Contact List Test Cases
Test case prioritization is typically based on:
- Risk: Which functionalities are most critical to the business and most likely to fail or cause significant user impact? For a contact list, adding, viewing, and searching are usually high-risk. A bug in editing or deleting might be less critical than a failure to add a new contact.
- Frequency of Use: Features used more often by users should be prioritized.
- Complexity: More complex features or those with a higher number of integration points might warrant higher priority.
- Impact of Failure: What is the consequence if this particular functionality fails? A failure in a checkout process (if contacts were linked to purchases) would be high priority; a minor UI glitch in contact sorting might be low priority.
Priority Levels:
- High: Core functionalities, critical paths, high-risk areas. These tests *must* pass before release. (e.g., Adding a contact, basic search, editing contact details).
- Medium: Important functionalities, common use cases, areas with moderate risk. These should pass, but minor issues might be accepted with a workaround. (e.g., Advanced search filters, contact sorting, adding contacts with optional fields).
- Low: Less critical functionalities, edge cases with low probability of occurrence, cosmetic issues. These might be deferred or tested if time permits. (e.g., Very long names exceeding practical limits, specific international number formats not commonly used).
Establishing Traceability
Traceability is the ability to link requirements to test cases, and often to defects as well. This is usually managed through a Requirements Traceability Matrix (RTM) or within a Test Management Tool.
- Requirement to Test Case: For every requirement, there should be at least one test case designed to verify it. The "Requirement ID" field in our test case structure and matrix facilitates this.
- Test Case to Requirement: Conversely, each test case should map back to a specific requirement. This ensures that tests are not written in a vacuum and are directly contributing to validating product specifications.
- Test Case to Defect: When a test case fails, it should be linked to a defect report. This helps track which requirements are impacted by defects and understand the root cause of failures.
- Defect to Requirement: Defect reports should ideally link back to the requirement that was not met.
Benefits of Traceability:
- Completeness: Ensures all specified requirements have been tested.
- Impact Analysis: Helps understand the scope of a defect by identifying all requirements and test cases affected.
- Verification: Provides evidence that the system meets all specified requirements.
- Maintenance: Simplifies understanding the scope of changes when requirements evolve.
Tools like Jira with plugins (e.g., Zephyr, Xray), TestRail, or Azure DevOps can effectively manage traceability by linking requirements, test cases, and defects within a single platform.
Manual vs. Automated Testing for Contact Lists
Both manual testing and automated testing play vital roles in ensuring the quality of a contact list feature. They are not mutually exclusive but rather complementary approaches that offer different benefits.
The Role of Manual Testing
Manual testing involves a human tester interacting with the application to find defects. It excels in areas where human judgment, exploratory instincts, and user experience evaluation are paramount.
- Exploratory Testing: Skilled testers can go "off-script," probing the application in unexpected ways based on their intuition and understanding of user behavior. This is invaluable for finding defects that scripted tests might miss.
- Usability and UX: Manual testers can assess the overall user experience – is the flow intuitive? Are error messages helpful? Is the design visually appealing?
- Initial Bug Discovery: Early in development, manual testing is often the quickest way to find obvious bugs.
- Complex Scenarios: Certain complex interactions or integration points might be difficult or time-consuming to automate, making manual testing more practical.
- Accessibility Testing: While automated tools can identify some accessibility issues, manual testing with assistive technologies (screen readers, keyboard navigation) is essential for a truly accessible experience.
Example Manual Test: Imagine a user receives a notification that a contact has been updated, but when they open the contact, the changes aren't reflected. A manual tester might try to reproduce this by quickly editing a contact, then immediately navigating away and back, or even force-quitting the app and reopening it to see how state is managed.
The Power of Automated Testing
Automated testing uses scripts and tools to execute predefined test cases and compare actual results against expected results. It is highly effective for repetitive tasks, regression testing, and performance testing.
- Regression Testing: As the application evolves, automated tests can quickly re-run existing checks to ensure that new changes haven't broken previously working functionality. This is a massive time-saver.
- Speed and Efficiency: Automated tests can run much faster than manual tests, especially for large suites.
- Consistency and Repeatability: Automated tests execute the exact same steps every time, eliminating human error and ensuring consistent results.
- Data-Driven Testing: Automated frameworks can easily be configured to run tests with a wide variety of data inputs, allowing for thorough data validation.
- API Testing: Automated tests can directly interact with the application's backend APIs to validate data integrity and business logic without needing a UI.
Example Automated Test (Conceptual using Appium for Android):
# Conceptual Appium script for adding a contact
from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# Setup driver
desired_caps = {
"platformName": "Android",
"deviceName": "emulator-5554",
"appPackage": "com.example.contacts",
"appActivity": ".MainActivity",
"automationName": "UiAutomator2"
}
driver = webdriver.Remote("http://localhost:4723/wd/hub", desired_caps)
wait = WebDriverWait(driver, 10)
try:
# 1. Navigate to Add Contact screen
add_button = wait.until(EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Add Contact")))
add_button.click()
# 2. Enter details
first_name_field = wait.until(EC.element_to_be_clickable((MobileBy.ID, "com.example.contacts:id/first_name_edittext")))
first_name_field.send_keys("Test")
last_name_field = driver.find_element(MobileBy.ID, "com.example.contacts:id/last_name_edittext")
last_name_field.send_keys("User")
phone_field = driver.find_element(MobileBy.ID, "com.example.contacts:id/phone_edittext")
phone_field.send_keys("9876543210")
# 3. Save Contact
save_button = driver.find_element(MobileBy.ID, "com.example.contacts:id/save_button")
save_button.click()
# 4. Verify contact is in list
contact_name_in_list = wait.until(EC.presence_of_element_located((MobileBy.XPATH, "//android.widget.TextView[@text='Test User']")))
assert contact_name_in_list.is_displayed()
print("Contact 'Test User' found in list. Test Passed.")
except Exception as e:
print(f"Test Failed: {e}")
finally:
driver.quit()
This script automates the basic "add contact" flow. For a real-world scenario, you’d add assertions for confirmation messages, error handling, and verification of all fields.
Synergy of Manual and Automated Testing
The most effective strategy combines both. Manual testing can focus on exploratory testing, usability, and identifying new types of defects, while automated testing handles the heavy lifting of regression and repetitive checks.
Tools like SUSA (susatest.com) represent a modern approach by using autonomous exploration to discover new flows and potential issues, then automatically generating regression scripts (e.g., Appium for Android, Playwright for Web). This bridges the gap, allowing autonomous discovery to inform and enhance both manual and automated testing efforts. The autonomous platform explores the app itself, mimicking user behavior with various personas, and identifies dead buttons, crashes, ANRs, and UX friction. It then uses this discovered knowledge to auto-generate scripts, ensuring that the most critical user flows are covered by automation.
Writing Specific Test Cases: A Deeper Dive with Examples
Let's expand on the test cases introduced earlier and add more specific examples, focusing on scenarios that often cause issues in contact list applications.
Contact Creation Scenarios
Beyond the basic positive case, consider:
- TC_CL_ADD_007: Add Contact with Only Mandatory Fields
- Preconditions: User is on the "Add New Contact" screen.
- Steps: Fill only the "First Name" and "Phone Number" fields (assuming these are the only mandatory ones). Tap "Save".
- Expected Result: Contact is saved successfully and appears in the list with only the provided details.
- TC_CL_ADD_008: Add Contact with All Optional Fields
- Preconditions: User is on the "Add New Contact" screen.
- Steps: Fill all available fields: First Name, Last Name, Phone, Email, Address, Company, Notes, etc. Tap "Save".
- Expected Result: Contact is saved successfully, and all entered details are visible and accurate when viewing the contact.
- TC_CL_ADD_009: Attempt to Add Contact with Duplicate Phone Number
- Preconditions: A contact with phone number "555-1234" already exists.
- Steps: Navigate to "Add New Contact". Enter a new First Name, Last Name, and the duplicate phone number "555-1234". Tap "Save".
- Expected Result: The system should either prevent saving, prompt the user about the duplicate, or flag it clearly. Ideally, it prevents creating a duplicate entry that could cause confusion.
- TC_CL_ADD_010: Add Contact with International Phone Number Format
- Preconditions: User is on the "Add New Contact" screen.
- Steps: Enter a valid international phone number (e.g., "+1-202-555-0100" or "+44 20 7946 0958"). Tap "Save".
- Expected Result: Contact is saved, and the phone number is stored and displayed in the entered format, or a standardized international format.
- TC_CL_ADD_011: Add Contact with Long Name (Boundary)
- Preconditions: User is on the "Add New Contact" screen.
- Steps: Enter a first name and last name that together exceed the practical display limit (e.g., 100 characters). Tap "Save".
- Expected Result: The contact is saved. The name might be truncated in the list view but fully visible in the details view, or the input might be limited to a reasonable length. The application should not crash.
Contact Editing and Deletion Scenarios
- TC_CL_EDIT_005: Edit Contact - Change Phone Number and Email
- Preconditions: A contact named "Jane Smith" exists with phone "111-222-3333" and email "jane@old.com".
- Steps: Find and open "Jane Smith". Edit the phone number to "444-555-6666" and email to "jane@new.com". Tap "Save".
- Expected Result: The contact is updated successfully. Viewing "Jane Smith" shows the new phone number and email.
- TC_CL_EDIT_006: Edit Contact - Remove All Details
- Preconditions: A contact exists.
- Steps: Open the contact. Clear all fields (First Name, Last Name, Phone, Email, etc.). Tap "Save".
- Expected Result: The system should either prevent saving an empty contact or save it but indicate it's incomplete. It should not crash. The contact might be displayed as "Unnamed" or similar in the list.
- TC_CL_DEL_003: Cancel Deletion
- Preconditions: A contact exists.
- Steps: Find and select the contact. Tap the "Delete" button. When prompted for confirmation, tap "Cancel".
- Expected Result: The contact is NOT deleted. The user is returned to the contact list or details view.
Search and Filtering Scenarios
- TC_CL_SEARCH_006: Search for Contact with Special Characters
- Preconditions: A contact named "O'Malley, John" exists.
- Steps: In the search bar, type "O'Malley".
- Expected Result: "O'Malley, John" is found.
- TC_CL_SEARCH_007: Search by Partial Phone Number
- Preconditions: Contacts exist with numbers like "555-1234", "555-5678", "111-555-9999".
- Steps: Search for "555".
- Expected Result: All contacts whose phone numbers contain "555" are returned.
- TC_CL_SEARCH_008: Case-Insensitive Search
- Preconditions: A contact named "Alice Wonderland" exists.
- Steps: Search for "alice wonderland".
- Expected Result: "Alice Wonderland" is found.
Data Integrity and Edge Cases
- TC_CL_DATA_001: Contact with Empty Fields
- Preconditions: A contact was saved with only a First Name and Last Name, leaving Phone and Email blank.
- Steps: View the contact details.
- Expected Result: The Phone and Email fields are displayed as empty or with a placeholder (e.g., "N/A"), and the application does not show errors.
- TC_CL_DATA_002: Contact with Extremely Long Notes
- Preconditions: User is on the "Add New Contact" screen.
- Steps: Enter a standard contact name and phone. In the "Notes" field, paste a very large amount of text (e.g., 10,000 characters). Tap "Save".
- Expected Result: The contact saves. The notes should be viewable, potentially with scrolling. The UI should not break, and performance should remain acceptable.
- TC_CL_DATA_003: Contacts with Identical Names (Boundary)
- Preconditions: Two contacts exist with the exact same First and Last Name (e.g., "John Smith").
- Steps: Search for "John Smith". View the list of results. Select one of the "John Smith" contacts and view its details.
- Expected Result: Both "John Smith" contacts appear in search results. Selecting one should show its unique details. The system must clearly differentiate between them, perhaps by showing different phone numbers or addresses in the list preview if available.
Integration with Autonomous Testing Platforms
While manual test case design is essential, it represents only one facet of a comprehensive testing strategy. Modern development cycles demand efficiency and broad coverage, which is where autonomous testing platforms like SUSA come into play.
How Autonomous Testing Complements Manual Test Cases
Autonomous testing platforms, such as SUSA (susatest.com), are designed to explore applications like a human user
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free