Unit Test Case Guide and Checklist
This article explains the purpose of unit testing, outlines best‑practice guidelines for creating and managing unit test plans, and provides a comprehensive checklist covering input validation, date and time verification, security, usability, logging, business logic, reporting, environment, email, and search functionality.
Unit Test Case Guide:
Unit test plans/cases should be provided separately and not merged with other steps; explore all possible test scenarios, including uncommon and alternative flows.
Software development and unit testing need to be divided into distinct phases with appropriate delivery schedules.
Treat unit test results as an independent deliverable to filter business‑process errors early, before integration or system testing.
Track project progress by counting passed and failed test cases.
Perform some immediate testing during development.
Input Data Validation:
This section lists checks that are typically applied to data entered into an application.
Required field testing
Unique field value testing
Null value testing
Allowed character set testing
Negative value testing
Field length limit testing
Impossible value testing
Garbage value testing
Dependency between fields testing
Equivalence partitioning and boundary condition testing
Error and exception handling testing
Date Validation:
This section defines a set of conditions for date fields.
Various date formats
American‑style date format
Valid dates
Invalid dates (e.g., month 00 or 13)
Day values should not be 00 or 32
Correct handling of 28, 29, 30 days
Impact of weekends and bank holidays
Leap‑year relationship with February 29
Time Validation:
This section defines a set of conditions for time fields.
Various time formats (12/24‑hour, AM/PM)
Valid time checking
Invalid time checking
Impact of weekends and work holidays
Postal Code Validation:
This section defines a set of conditions for postal‑code fields.
Test partial postal‑code input and format
Test with and without spaces
Check for manual address entry option
System Interface:
This section defines conditions for fields transferred between multiple application systems.
Verify all fields/parameters on the interface execute correctly
All data fields must work according to the validation list
Security testing across automated interfaces
Check inheritance relationships
Usability:
This section lists conditions that help verify application usability.
Layout matches design standards
Font, color, size, etc., are correct
Brand guidelines are followed
Window titles include application name and window name
Alignment checks
Screen is resizable and minimizable
Spell checking
Default values are tested when necessary
Required fields are highlighted with an asterisk
Security:
This section lists conditions that help verify application security.
Password characters are not visible
Access testing with multiple levels
Password change functionality
Error messages do not leak system information
SSL deployment verification
Lockout rule enforcement
Password storage (plain or encrypted) verification
Valid and invalid UserId authentication tests
Valid password and various invalid password tests
Direct URL access prompts for login credentials
Browser does not remember passwords
Logging, Auditing, and Tracing:
This section defines conditions that help verify audit logs and system logs.
Logs are saved within the specified time window
Logs contain personal data where appropriate
Administrator actions are logged
User lockout events are logged
Business Application Logic:
This section defines conditions that help verify business logic and processing.
All product options are explored
Upgrade and downgrade paths and options are checked
Upgrades/downgrades are applied to billing, networking, self‑service, etc.
Stop/disconnect/termination behavior
Device failure behavior
Rounding of calculated amounts
Full range of test accounts (type/status/conditions) is used
Currency symbols are displayed as required
No duplicate records
Overflow checks with large numeric values
Reporting:
This section lists checks that help verify reporting functionality.
All fields are available
Fields have sufficient space
Scrolling and panning are enabled
Page indicators show report size (N of M) and allow navigation to middle/end
Reports export correctly to Excel/Word
Reports print correctly with accurate data display
All pages in the report are accessible
Environment:
This section lists checks that help verify the AUT environment or device requirements.
Test using all browsers
Test with JavaScript enabled and disabled
Email:
This section lists checks that can be used to verify email functionality.
Confirmation message is shown when sending email
Links in the email work correctly
Reply‑to address is correct
Email font, size, and alignment are correct
Search Criteria:
This section lists checks for the application’s search functionality.
Scrollbar implementation is verified
Result alignment is correct
Valid results are displayed for any combination of search criteria
Correct results are retrieved for AND/OR conditions
Results are shown in alphabetical or specified order
Column headers are sortable
Disclaimer: This article was originally published on the WeChat public account “FunTester”. Unauthorized reproduction (except by Tencent Cloud) is prohibited.
FunTester
10k followers, 1k articles | completely useless
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.