Test-Driven Development with Python
هدف اصلی من یاد دادن یک متدولوژی برای توسعهی برنامههای وب هست، که فکر میکنم باعث بهتر شدن برنامههای وب و همچنین شادمانی توسعه دهندگان میشود. این کتاب، راهنمایی برای یادگیری گرامر پایتون، یا آموزش توسعهی وب نیز نیست. در عوض امیدوارم که به شما چگونگی استفاده از TDD برای برنامههای خود بیاموزید و به هدف مقدس ما یعنی "کدهای تمیزی که کار میکنند" دست یابید.
Outline
I’ve split this book into three parts.
Part I (Chapters 1–6): The basics
Dives straight into building a simple web app using TDD. We start by writing a functional test (with Selenium), then we go through the basics of Django—models, views, templates—with rigorous unit testing at every stage. I also introduce the Testing Goat.
Part II (Chapters 7–14): Web development essentials
Covers some of the trickier but unavoidable aspects of web development, and shows how testing can help us with them: static files, deployment to production, form data validation, database migrations, and the dreaded JavaScript.
Part III (Chapters 15–20): More advanced topics
Mocking, integrating a third-party authentication system, Ajax, test fixtures, Outside-In TDD, and Continuous Integration (CI).
On to a little housekeeping…
Table of Contents:
Chapter 1. Getting Django Set Up Using a Functional Test
Chapter 2. Extending Our Functional Test Using the unittest Module
Chapter 3. Testing a Simple Home Page with Unit Tests
Chapter 4. What Are We Doing with All These Tests?
Chapter 5. Saving User Input
Chapter 6. Getting to the Minimum Viable Site
Chapter 7. Prettification: Layout and Styling, and What to Test About It
Chapter 8. Testing Deployment Using a Staging Site
Chapter 9. Automating Deployment with Fabric
Chapter 10. Input Validation and Test Organisation
Chapter 11. A Simple Form
Chapter 12. More Advanced Forms
Chapter 13. Dipping Our Toes, Very Tentatively, into JavaScript
Chapter 14. Deploying Our New Code
Chapter 15. User Authentication, Integrating Third-Party Plugins, and Mocking with JavaScript
Chapter 16. Server-Side Authentication and Mocking in Python
Chapter 17. Test Fixtures, Logging, and Server-Side Debugging
Chapter 18. Finishing “My Lists”: Outside-In TDD
Chapter 19. Test Isolation, and “Listening to Your Tests”
Chapter 20. Continuous Integration (CI)
Chapter 21. The Token Social Bit, the Page Pattern, and an Exercise for the Reader
Chapter 22. Fast Tests, Slow Tests, and Hot Lava