Python测试驱动开发(影印版 英文版) [Test-Driven Development with Python]_试读_书评_源码_高清pdf下载

341次阅读
没有评论
Python测试驱动开发(影印版

Python测试驱动开发(影印版 英文版) [Test-Driven Development with Python],由东南大学出版社在2015-09-01月出版发行,本书编译以及作者信息为: Harry J.W. Percival 著,这是第1次发行, 国际标准书号为:9787564159153,品牌为南京东南大学出版社, 这本书采用平装开本为16开,纸张采为胶版纸,全书共有463页,字数61万2000字,值得推荐。

此书内容摘要

《Python测试驱动开发(影印版 英文版)》这本实用指南带你从头至尾经历一个真实Web应用开发的全过程,展示了Python测试驱动开发(TDD)的优越性。你将学到如何在应用程序各部分被构建出来之前就编写并运行测试,然后开发*少量的代码就让这些测试运行通过。结果得到什么?能够运行的简洁代码。
在书中,你将学到Diango、Selenium、git、iQuery和Mock的基础知识,另外还有现代Web开发技巧。如果你准备将自己的Python技术提升到下一个层次,《Python测试驱动开发(影印版 英文版)》清楚地展示了测试驱动开发是如何提倡简单设计并增进信心。
深入测试驱动开发工作流,包括单元测试/编码周期循环和重构 为类和函数使用单元测试,并为浏览器内的用户交互使用功能测试 学习何时与如何运用mock对象,以及单独和集成测试的优缺点 在开发用服务器上测试以及自动化部署 将测试运用到网站集成的第三方插件上去 使用一个持续集成环境来自动运行测试

关于此书作者

暂无.

编辑们的推荐

暂无.

Python测试驱动开发(影印版 英文版) [Test-Driven Development with Python]图书的目录

Preface
Prerequisites and Assumptions
Companion Video
Acknowledgments
Part I. The Basics of TDD and Django
1. Getting Django Set Up Using a Functional Test
Obey the Testing Goat! Do Nothing Until You Have a Test
Getting Django Up and Running
Starting a Git Repository

2. Extending Our Functional Test Using the unittest Module
Using a Functional Test to Scope Out a Minimum Viable App
The Python Standard Library’s unittest Module
Implicit waits
Commit

3. Testing a Simple Home Page with Unit Tests
Our First Django App, and Our First Unit Test
Unit Tests, and How They Differ from Functional Tests
Unit Testing in Django
Django’s MVC, URLs, and View Functions
At Last! We Actually Write Some Application Code!
urls.py
Unit Testing a View
The Unit-Test/Code Cycle

4. What Are We Doing with All These Tests?
Programming Is like Pulling a Bucket of Water up from a Well
Using Selenium to Test User Interactions
The “Don’t Test Constants” Rule, and Templates to the Rescue
Refactoring to Use a Template
On Refactoring
A Little More of Our Front Page
Recap: The TDD Process

S. Saving User Input
Wiring Up Our Form to Send a POST Request
Processing a POST Request on the Server
Passing Python Variables to Be Rendered in the Template
Three Strikes and Refactor
The Django ORM and Our First Model
Our First Database Migration
The Test Gets Surprisingly Far
A New Field Means a New Migration
Saving the POST to the Database
Redirect After a POST
Better Unit Testing Practice: Each Test Should Test One Thing
Rendering Items in the Template
Creating Our Production Database with migrate

6. Getting to the Minimum Viable Site
Ensuring Test Isolation in Functional Tests
Running lust the Unit Tests
Small Design When Necessary
YAGNI!
REST
Implementing the New Design Using TDD
Iterating Towards the New Design
Testing Views, Templates, and URLs Together with the Django Test Client
A New Test Class
A New URL
A New View Function
A Separate Template for Viewing Lists
Another URL and View for Adding List Items
A Test Class for New List Creation
A URL and View for New List Creation
Removing Now-Redundant Code and Tests
Pointing Our Forms at the New URL
Adjusting Our Models
A Foreign Key Relationship
Adjusting the Rest of the World to Our New Models
Each List Should Have Its Own URL
Capturing Parameters from URLs
Adjusting new_list to the New World
One More View to Handle Adding Items to an Existing List
Beware of Greedy Regular Expressions!
The Last New URL
The Last New View
But How to Use That URL in the Form?
A Final Refactor Using URL includes

Part II. Web Development Sine Qua Nons
7. Prettification: Layout and Styling, and What to Test About It
8. Testing Deployment Using a Staging Site.
9. Automating Deployment with Fabric
10. Input Validation and Test Organisation
11. A Simple Form
12. More Advanced Forms
13. Dipping Our Toes, Very Tentatively, into JavaScript
14. Deploying Our New Code

Part III. More Advanced Topics
15. User Authentication, Integrating Third-Party Plugins, and Mocking with JavaScript.
16. Server-Side Authentication and Mocking in Python
17. Test Fixtures, Logging, and Server-Side Debugging
18. Finishing “My Lists”: Outside-In TDD
19. Test Isolation, and “Listening to Your Tests”.
20. Continuous Inteoration (CI)
21. The Token Social Bit, the Page Pattern, and an Exercise for the Reader
22. Fast Tests, Slow Tests, and Hot Lava..

Obey the Testing Goat!
A. PythonAnywhere
B. Django Class-Based Views
C. Provisioning with Ansible
D. Testing Database Migrations
E. Behaviour-Driven Development (BDD)
F. Cheat Sheet
G. What to Do Next
H. Bibliography
Index

部分内容试读

暂无.

关于此书评价

暂无.

书摘内容

暂无.

Python测试驱动开发(影印版 英文版) [Test-Driven Development with Python]最新最全的试读、书评、目录、简介信息由Python中文网整理提供。

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:Python教程2022-10-24发表,共计3804字。
新手QQ群:570568346,欢迎进群讨论 Python51学习