Advanced Database Testing and Workflow Automation with PostgreSQL, Django, and Docker.
15 videos • 768 views • by Very Academy Module: Advanced Database Testing and Workflow Automation with PostgreSQL, Django, and Docker This module is designed to equip learners with advanced skills in database schema management, automated testing, and workflow integration using modern tools like PostgreSQL, Django, and Docker. Through a blend of theoretical knowledge and hands-on exercises, participants will explore structural testing, schema creation, and advanced features such as Docker HealthCheck, Pytest fixtures, and Django migrations. Key topics include creating and managing PostgreSQL schemas, setting up testing workflows with Docker, utilizing Pytest for validating table structures and relationships, and enforcing custom constraints. Learners will also gain practical experience in building test databases, working with FactoryBoy and Faker for model factories, and testing stored procedures and triggers. By the end of this module, learners will be able to effectively manage complex database schemas, automate testing workflows, and integrate these processes within a Dockerized environment to ensure robust and scalable applications. 1. Module Introduction and Learning Outcomes 2. Planning: Expanding Structural Testing 3. Preparing for Learning - Source Code + Setup Guide 4. Introducing PostgreSQL Table Schemas 5. **Exercise 1:** Creating and Managing PostgreSQL Schemas 6. **Exercise 2:** PostgreSQL Schema Search Path 7. **Exercise 3:** Django Custom Migration - Assigning Models to Multiple PostgreSQL Schemas 8. Planning: Building the Testing Workflow with Docker API 9. Introducing Pytest Fixtures 10. **Exercise 4:** Building a Docker Container with Docker API 11. Introducing Docker HealthCheck 12. **Exercise 5:** Docker HealthCheck Instruction 13. **Exercise 6:** Migrating a Django Model to a Test Database 14. Introducing Docker Networks 15. Test Plan - Table and Column Validation Part-1 16. **Test Case 1:** Check Category Table Exists 17. **Test Case 2:** Validate Expected Columns 18. Pytest Information Schema 19. **Test Case 3:** Verify Expected Field Count 20. **Test Case 4:** Validate Table Relationships 21. **Test Case 5:** Verify Nullable Fields 22. **Exercise 8:** Django Custom Migration: Database Level Default Values 23. **Test Case 6:** Verify Default Values 24. **Test Case 7:** Verify Column Lengths 25. **Test Case 8:** Validate Enforcement of Unique Constraints 26. Test Plan - Custom Constraints 27. **Exercise 9:** FactoryBoy and Faker Model Factories 28. **Test Case 9:** Test Enforcement of Empty String Constraint 29. **Test Case 10:** Test Enforcement of Slug Format Constraint 30. **Test Case 11:** Test Enforcement of Level Boundaries Constraint 31. None. 32. Test Plan - Stored Procedures and Function Testing 33. **Test Case 12:** Verify stored procedures and functions 34. **Test Case 13:** Test Trigger Behaviour Lowercase_Name_Trigger 35. Test Plan - Schema Testing 36. **Test Case 14:** Verify the Presence of a Specific Schema in the Database 37. **Test Case 15:** Validate that Table is Part of the Schema