Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Edge Case and Special Scenario Tests #584

Open
AlexanderPumaPucho opened this issue Nov 19, 2024 · 0 comments
Open

Add Edge Case and Special Scenario Tests #584

AlexanderPumaPucho opened this issue Nov 19, 2024 · 0 comments

Comments

@AlexanderPumaPucho
Copy link

Hi there 👋,
I’m proposing to add a set of tests that cover edge cases and special scenarios to improve TinyDB’s robustness and reliability. These tests focus on situations like empty inputs, large data, special keys, nested structures, invalid configurations, and cache behavior, among others.

The goal is to ensure TinyDB handles uncommon scenarios gracefully and fails safely when necessary, without compromising data integrity. 🎯

Test Summary

Category What’s Being Tested Scenarios Covered
Empty or Null Inputs Validate how the database handles empty or None values. - Inserting empty dictionaries.
- Searching for nonexistent keys.
- Attempting to insert None.
Large Data Insertion Test the database's ability to handle large documents. - Inserting very large strings and validating proper retrieval.
Special Keys and Values Check support for unusual key-value combinations. - Keys with unusual characters.
- None values.
- Complex nested structures.
Nonexistent Keys Verify operations with keys that don’t exist. - Searching, updating, or deleting nonexistent keys.
Operations on Empty DB Validate functionality when the database is empty. - Querying, counting, updating, or deleting when no data exists.
Invalid Configurations Handle errors with incorrect configurations. - Using an invalid storage class.
Transform Errors Ensure failed transformations don’t corrupt data. - Simulating exceptions during data transformations.
- Ensuring partial transformations don’t affect database integrity.
Cache Behavior Validate cache consistency during reads and writes. - Testing read-after-write consistency.
- Multiple writes with a defined cache limit.
JSON Storage and Persistence Validate JSON storage behavior and file size. - Ensuring data is saved and retrieved correctly.
- Verifying the file isn’t empty after saving data.
- Confirming file handles are properly closed.

I hope this contribution is helpful. I’m happy to make adjustments, respond to feedback, or assist however needed 🚀.
Thanks for considering my proposal!


@AlexanderPumaPucho AlexanderPumaPucho changed the title Propose Addition of Edge Case and Limit Testing Add Edge Case and Special Scenario Tests Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant