This document provides a comprehensive checklist for testing the dynamic database update feature.
- R (version 4.5.0 or compatible) is installed
- All package dependencies are installed (
make deps) - Package is built and installed (
make install)
Run the test suite to verify all unit tests pass:
make testExpected tests to pass:
-
test-database-update.R::update_annotations_table adds only new entries -
test-database-update.R::update_annotations_table handles duplicate coordinates with different REF/ALT -
test-database-update.R::update_annotations_table handles missing file gracefully -
test-database-update.R::update_annotations_table processes paths correctly - All existing tests continue to pass (no regressions)
Check that the new functionality has adequate test coverage:
make coverageExpected coverage:
-
update_annotations_table()function has >80% coverage - Overall package coverage remains stable or improves
-
Install and start the application:
make install make run
-
Verify the app starts successfully
-
Login with test credentials
-
Note the initial number of images available for voting
-
Open the to_be_voted_images file:
nano ./app_env/images/to_be_voted_images.tsv
-
Add one or more new entries (ensure coordinates/REF/ALT combination is unique):
chr99:99999 A G app_env/images/screenshot_URO_003_mutations_varSorted_redoBAQ/test_new.png
-
Save the file
-
Wait approximately 5-10 seconds
-
Verify:
- Console shows: "Added X new entries to annotations table"
- User sees notification: "Database updated: X new entries added"
- New images appear in the voting queue
-
Add entries that already exist in the file:
chr8:117226952 A T app_env/images/screenshot_URO_003_mutations_varSorted_redoBAQ/0a0b53acbf9fac0f45dfcf77a8c6baae.png
-
Save the file
-
Wait approximately 5-10 seconds
-
Verify:
- Console shows: "No new entries found in to_be_voted_images_file"
- No notification is shown to users
- No duplicate entries in the database
-
Add an entry with the same coordinates but different REF/ALT:
chr8:117226952 G C app_env/images/screenshot_URO_003_mutations_varSorted_redoBAQ/different_mutation.png
-
Save the file
-
Wait approximately 5-10 seconds
-
Verify:
- Console shows: "Added 1 new entries to annotations table"
- User sees notification
- New entry is added (not rejected as duplicate)
-
Open the app in multiple browser tabs/windows with different users
-
Add new entries to the file as in Test Case 1
-
Verify:
- All users see the notification
- New images become available to all users
-
Temporarily make the to_be_voted_images file unreadable:
chmod 000 ./app_env/images/to_be_voted_images.tsv
-
Touch the file to update its modification time:
touch ./app_env/images/to_be_voted_images.tsv
-
Wait approximately 5-10 seconds
-
Verify:
- Console shows error message
- User sees error notification
- App continues to function normally
-
Restore file permissions:
chmod 644 ./app_env/images/to_be_voted_images.tsv
-
Add a large number of entries (e.g., 100+) to the file
-
Save the file
-
Wait for update to complete
-
Verify:
- Update completes successfully
- Notification shows correct count
- App remains responsive
-
Leave the app running for an extended period (e.g., 30 minutes)
-
Periodically add new entries to the file
-
Verify:
- File watcher continues to work reliably
- No memory leaks or performance degradation
- All updates are detected and processed
-
Measure time between file modification and notification:
- Expected: 5-10 seconds (5-second check interval + processing time)
-
Measure time to update database with different entry counts:
- 1 entry: <1 second
- 10 entries: <2 seconds
- 100 entries: <5 seconds
-
Monitor memory usage during extended operation:
- Memory usage remains stable (no leaks)
-
Monitor CPU usage:
- Minimal CPU usage during idle (just periodic checks)
- Acceptable CPU spike during update
- File is deleted and recreated
- File becomes empty
- File contains malformed data
- File contains columns in different order
- File contains extra columns
- File contains missing columns
- Very large file (1000+ entries)
- Rapid successive modifications
- NEWS.md includes feature description
- README.md includes usage example
- dev_scripts/README.md provides testing instructions
- IMPLEMENTATION_SUMMARY.md explains technical details
- All functions have proper roxygen2 documentation
- No R CMD check warnings or errors
- Code follows existing style conventions
- No hardcoded values (all configurable)
- Proper error handling throughout
- Informative console messages
- Helpful user notifications
Document any known limitations or issues:
- Check interval is hardcoded to 5 seconds (could be made configurable)
- No support for removing entries (only adding)
- File must maintain same column structure
Once all tests pass and the feature is verified:
- All automated tests pass
- All manual tests pass
- Performance is acceptable
- Documentation is complete
- Code review completed
- Ready for production use
Tested by: ________________ Date: ________________ Version: ________________