当前位置:首页>正文

Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作 azw3 下载 fb2 在线 docx 2025 pdf kindle

免费下载书籍地址:PDF下载地址

精美图片

Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作书籍详细信息

  • ISBN:9787564159153
  • 作者:暂无作者
  • 出版社:暂无出版社
  • 出版时间:2015-09
  • 页数:暂无页数
  • 价格:56.90
  • 纸张:轻型纸
  • 装帧:平装-胶订
  • 开本:16开
  • 语言:未知
  • 丛书:暂无丛书
  • TAG:暂无
  • 豆瓣评分:暂无豆瓣评分

寄语:

新华书店正版,关注店铺成为会员可享店铺专属优惠,团购客户请咨询在线客服!

内容简介:

本书通过从头开发一个真实的Web应用,介绍了Python测试驱动开发的优势。读者将学会如何在构建应用的每个部分之前编写和运行测试,然后用少的代码通过这些测试。

书籍目录:

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

5.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 Ⅱ.Web Development Sine Qua Nons

7.Prettification: Layout and Styling, and What to Test About It

What to Functionally Test About Layout and Style

Pretti Fication: Using a CSS Framework

Django Template Inheritance

Integrating Bootstrap

Rows and Columns

Static Files in Django

Switching to Static Live Server Test Case

Using Bootstrap Components to Improve the Look of the Site

Jumbotron!

Large Inputs

Table Styling

Using Our Own CSS

What We Glossed Over: collectstatic and Other Static Directories

A Few Things That Didn't Make It

8.Testing Deployment Using a Staging Site

TDD and the Danger Areas of Deployment

As Always, Start with a Test

Getting a Domain Name

Manually Provisioning a Server to Host Our Site

Choosing Where to Host Our Site

Spinning Up a Server

User Accounts, SSH, and Privileges

Installing Nginx

Configuring Domains for Staging and Live

Using the FT to Confirm the Domain Works and Nginx Is Running

Deploying Our Code Manually

Adjusting the Database Location

Creating a Virtualenv

Simple Nginx Configuration

Creating the Database with migrate

Getting to a Production—Ready Deployment

Switching to Gunicorn

Getting Nginx to Serve Static Files

Switching to Using Unix Sockets

Switching DEBUG to False and Setting ALLOWED_HOSTS

Using Upstart to Make Sure Gunicorn Starts on Boot

Saving Our Changes: Adding Gunicorn to Our requirements.txt

Automating

"Saving Your Progress"

9.Automating Deployment with Fabric

Breakdown of a Fabric Script for Our Deployment

Trying It Out

Deploying to Live

Nginx and Gunicorn Config Using sed

Git Tag the Release

Further Reading

10.Input Validation and Test Organisation

Validation FT: Preventing Blank Items

Skipping a Test

Splitting Functional Tests out into Many Files

Running a Single Test File

Fleshing Out the FT

Using Model—Layer Validation

Refactoring Unit Tests into Several Files

Unit Testing Model Validation and the self assert Raises Context Manager

A Django Quirk: Model Save Doesn't Run Validation

Surfacing Model Validation Errors in the View

Checking Invalid Input Isn't Saved to the Database

Django Pattern: Processing POST Requests in the Same View as Renders the Form

Refactor: Transferring the new_item Functionality into view_list

Enforang Model Validation in view_list

Refactor: Removing Hardcoded URLs

The {% url %} Template Tag

Using get_absolute_url for Redirects

11.A Simple Form

Moving Validation Logic into a Form

Exploring the Forms API with a Unit Test

Switching to a Django Model Form

Testing and Customising Form Validation

Using the Form in Our Views

Using the Form in a View with a GET Request

A Big Find and Replace

Using the Form in a View That Takes POST Requests

Adapting the Unit Tests for the new_list View

Using the Form in the.View

Using the Form to Display Errors in the Template

Using the Form in the Other View

A Helper Method for Several Short Tests

Using the Form's Own Save Method

12.More Advanced Forms

Another FT for Duplicate Items

Preventing Duplicates at the Model Layer

A Little Digression on Queryset Ordering and String Representations

Rewriting the Old Model Test

Some Integrity Errors Do Show Up on Save

Experimenting with Duplicate Item Validation at the Views Layer

A More Complex Form to Handle Uniqueness Validation

Using the Existing List Item Form in the List View

13.Dipping Our Toes, Very Tentatively, into Java Script

Starting with an FT

Setting Up a Basic Java Script Test Runner

Usingi Query and the Fixtures Div

Building a Java Script Unit Test for Our Desired Functionality

Java Testing in the TDD Cycle

Columbo Says: Onload Boilerplate and Namespacing

A Few Things That Didn't Make It

14.Deploying Our New Code

Staging Deploy

Live Deploy

What to Do If You See a Database Error

Wrap—Up: git tag the New Release

……

Part Ⅲ.More Advanced Topics

Index

作者介绍:

Harry J.W.Percival,在PyhonAnywhere LLP工作,并带着全部激情和热忱在优选的演讲、培训和会议中传播测试驱动开发的福音。他持有利物浦大学的计算机科学硕士学位以及剑桥大学的哲学硕士学位。

出版社信息:

暂无出版社相关信息,正在全力查找中!

书籍摘录:

暂无相关书籍摘录,正在全力查找中!

在线阅读/听书/购买/PDF下载地址:

在线阅读地址:Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作在线阅读

在线听书地址:Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作在线收听

在线购买地址:Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作在线购买

原文赏析:

暂无原文赏析,正在全力查找中!

其它内容:

暂无其它内容!

书籍真实打分

故事情节:9分

人物塑造:5分

主题深度:9分

文字风格:3分

语言运用:3分

文笔流畅:8分

思想传递:4分

知识深度:9分

知识广度:6分

实用性:4分

章节划分:4分

结构布局:8分

新颖与独特:8分

情感共鸣:3分

引人入胜:5分

现实相关:8分

沉浸感:3分

事实准确性:6分

文化贡献:3分

网站评分

书籍多样性:3分

书籍信息完全性:6分

网站更新速度:8分

使用便利性:7分

书籍清晰度:7分

书籍格式兼容性:4分

是否包含广告:3分

加载速度:9分

安全性:3分

稳定性:5分

搜索功能:7分

下载便捷性:6分

下载点评

  • txt(178+)
  • 一般般(439+)
  • 体验满分(379+)
  • 方便(453+)
  • 情节曲折(58+)
  • 差评少(415+)
  • 二星好评(587+)
  • 实惠(463+)
  • 图文清晰(600+)
  • 还行吧(327+)
  • 无水印(320+)
  • 好评多(423+)

下载评价

网友 曾***玉:直接选择epub/azw3/mobi就可以了,然后导入微信读书,体验百分百!!!

网友 邱***洋:不错,支持的格式很多

网友 后***之:强烈推荐!无论下载速度还是书籍内容都没话说 真的很良心!

网友 林***艳:很好,能找到很多平常找不到的书。

网友 瞿***香:非常好就是加载有点儿慢。

网友 石***烟:还可以吧,毕竟也是要成本的,付费应该的,更何况下载速度还挺快的

网友 訾***晴:挺好的,书籍丰富

网友 温***欣:可以可以可以

网友 陈***秋:不错,图文清晰,无错版,可以入手。

网友 蓬***之:好棒good

网友 孙***美:加油!支持一下!不错,好用。大家可以去试一下哦

版权声明

1本文:Python测试驱动开发 (美)珀西瓦尔(Harry J.W.Percival) 著 著作转载请注明出处。
2本站内容除签约编辑原创以外,部分来源网络由互联网用户自发投稿仅供学习参考。
3文章观点仅代表原作者本人不代表本站立场,并不完全代表本站赞同其观点和对其真实性负责。
4文章版权归原作者所有,部分转载文章仅为传播更多信息服务用户,如信息标记有误请联系管理员。
5本站一律禁止以任何方式发布或转载任何违法违规的相关信息,如发现本站上有涉嫌侵权/违规及任何不妥的内容,请第一时间联系我们申诉反馈,经核实立即修正或删除。


本站仅提供信息存储空间服务,部分内容不拥有所有权,不承担相关法律责任。

相关文章:

  • 合作社管理基础 章志平 编 著 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 全套4册 四大名著全套小学生版原著正版西游记三国演义水浒传红楼梦人民青少年版本少儿童版教育快乐读书吧五年级下册阅读课外出版社书籍 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 建筑工程评估基础——2007年全国注册资产评估师考试用书 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 9787564218225 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 正版弦乐队标准化训练教程1 小提琴 扫码听音乐 上海音乐出版社 常林 涵盖小提琴中提琴大提琴四种乐器弦乐队训练基础练习曲教材 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 可爱动物 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 日语笔译 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 材料疲劳理论与工程应用 azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 列宁民主集中制奥秘初探(第二版) azw3 下载 fb2 在线 docx 2025 pdf kindle
  • 公司法学 azw3 下载 fb2 在线 docx 2025 pdf kindle