书籍:Python Testing Cookbook, 2nd Edition - 2018.pdf python测试cookbook...

简介

图片.png

借助此基于解决方案的指南,修复Python中的日常测试问题

主要特点

  • 使用doctest和unittest等强大的工具来方便测试
  • 将自动化测试应用于非面向测试的现有遗留系统
  • 使用真实示例简化Python测试的实用指南

图书说明

自动化测试是提高效率,同时减少软件测试缺陷的最佳方法。它有助于在早期阶段轻松找到代码中的错误,从而有效地解决问题。本书深入研究Python中使用的基本测试概念,以帮助您构建健壮且可维护的代码。

Python Testing Cookbook首先简要介绍了Python的单元测试框架,以帮助您编写自动化测试用例。您将学习如何为您的软件编写合适的测试集,并使用Nose运行自动化测试套件。然后,您将使用unittest.mock库,该库允许您使用模拟对象替换正在测试的系统部分,并对如何使用它们进行断言。您还将了解如何应用测试驱动开发(TDD)和行为驱动开发(BDD)以及如何消除TDD引起的问题。该书解释了如何使用持续集成集成自动化测试并执行烟雾/负载测试。它还介绍了最佳实践,并将帮助您解决Python中的持久测试问题。本书最后帮助您了解doctest如何工作以及如何使用Selenium有效地测试代码。
你会学到什么

  • 从命令行运行测试用例,增加了详细程度
  • 编写一个Nose扩展来根据正则表达式选择测试
  • 使用doctest创建可测试文档
  • 使用Selenium测试Web用户界面
  • 用Voidspace Mock和Nose写一个可测试的故事
  • 配置TeamCity以在提交时运行Python测试
  • 更新项目级脚本以提供覆盖率报告

本书针对人员

如果您是一名Python开发人员,希望将测试提升到新的水平并希望扩展您的测试技能,那么本书适合您。假设您具有一些Python编程知识。

目录

  • 使用unittest开展基本测试
  • 运行Nose的自动测试套件
  • 用DOCTEST创建可测试的文档
  • 测试行为驱动发展的客户故事
  • 具有验收测试的高级客户场景
  • 集成自动测试与连续集成
  • 用测试覆盖率测量你的成功
  • 烟雾/负载测试 - 测试主要部件
  • 新的和传统系统的良好测试习惯
  • 使用Selenium进行Web UI测试

参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Shell scripting is a way to harness and customize the power of any Unix system, and an essential skill for Unix users, system administrators, and even professional Mac OS X developers. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards. This thoroughly revised edition of bash Cookbook teaches shell scripting the way Unix masters practice the craft. Three Unix veterans present a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell—the bash shell—and cygwin or other popular Unix emulation packages. This cookbook is full of useful scripts that readers can use right away, along with examples that explain how to create better scripts. Table of Contents Chapter 1. Beginning Bash Chapter 2. Standard Output Chapter 3. Standard Input Chapter 4. Executing Commands Chapter 5. Basic Scripting: Shell Variables Chapter 6. Shell Logic And Arithmetic Chapter 7. Intermediate Shell Tools I Chapter 8. Intermediate Shell Tools Ii Chapter 9. Finding Files: Find, Locate, Slocate Chapter 10. Additional Features For Scripting Chapter 11. Working With Dates And Times Chapter 12. End-User Tasks As Shell Scripts Chapter 13. Parsing And Similar Tasks Chapter 14. Writing Secure Shell Scripts Chapter 15. Advanced Scripting Chapter 16. Configuring And Customizing Bash Chapter 17. Housekeeping And Administrative Tasks Chapter 18. Working Faster By Typing Less Chapter 19. Tips And Traps: Common Goofs For Novices Appendix A Reference Lists Appendix B Examples Included With Bash Appendix C Command-Line Processing Appendix D Revision Control
Python Testing Cookbook Paperback: 364 pages Publisher: Packt Publishing (May 17, 2011) Language: English ISBN-10: 1849514666 ISBN-13: 978-1849514668 Over 70 simple but incredibly effective recipes for taking control of automated testing using powerful Python testing tools Learn to write tests at every level using a variety of Python testing tools The first book to include detailed screenshots and recipes for using Jenkins continuous integration server (formerly known as Hudson) Explore innovative ways to introduce automated testing to legacy systems Written by Greg L. Turnquist – senior software engineer and author of Spring Python 1.1 Part of Packt’s Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible In Detail Are you looking at new ways to write better, more efficient tests? Are you struggling to add automated testing to your existing system? The Python unit testing framework, originally referred to as “PyUnit” and now known as unittest, is a framework that makes it easier for you to write automated test suites efficiently in Python. This book will show you exactly how to squeeze every ounce of value out of automated testing. The Python Testing Cookbook will empower you to write tests using lots of Python test tools, code samples, screenshots, and detailed explanations. By learning how and when to write tests at every level, you can vastly improve the quality of your code and your personal skill set. Packed with lots of test examples, this will become your go-to book for writing good tests. This practical cookbook covers lots of test styles including unit-level, test discovery, doctest, BDD, acceptance, smoke, and load testing. It will guide you to use popular Python tools effectively and discover how to write custom extensions. You will learn how to use popular continuous integration systems like Jenkins (formerly known as Hudson) and TeamCity to automatically test your code upon check in. This book explores Python’s built-in ability to run code found embedded in doc strings and also plugging in to popular web testing tools like Selenium. By the end of this book, you will be proficient in many test tactics and be ready to apply them to new applications as well as legacy ones. A practical guide, this cookbook will ensure you fully utilize Python testing tools to write tests efficiently. What you will learn from this book : Get started with the basics of writing automated unit tests and asserting results Use Nose to discover tests and build suites automatically Write Nose plugins that control what tests are discovered and how to produce test reports Add testable documentation to your code Filter out test noise, customize test reports, and tweak doctest’s to meet your needs Write testable stories using lots of tools including doctest, mocks, Lettuce, and Should DSL Get started with the basics of customer-oriented acceptance testing Test the web security of your application Configure Jenkins and TeamCity to run your test suite upon check-in Capture test coverage reports in lots of formats, and integrate with Jenkins and Nose Take the pulse of your system with a quick smoke test and overload your system to find its breaking points Add automated testing to an existing legacy system that isn’t test oriented Approach This cookbook is written as a collection of code recipes containing step-by-step directions on how to install or build different types of Python test tools to solve different problems. Each recipe contains explanations of how it works along with answers to common questions and cross references to other relevant recipes. The easy-to-understand recipe names make this a handy test reference book. Who this book is written for Python developers and programmers with a basic understanding of Python and Python testing will find this cookbook beneficial. It will build on that basic knowledge equipping you with the intermediate and advanced skills required to fully utilize the Python testing tools. Broken up into lots of small code recipes, you can read this book at your own pace, whatever your experience. No prior experience of automated testing is required.
《Docker Cookbook: Over 100 Practical and Innovative Recipes to help you efficiently build, debug, and deploy modern applications with Docker》这本书是一本关于Docker的烹饪书,提供了100多个实用且创新的配方,帮助读者更有效地使用Docker构建、调试和部署现代应用程序。 这本书的重点是Docker的实际应用。它通过提供各种示例和场景,教读者如何使用Docker来解决真实世界中的问题。无论是初学者还是有经验的开发者,读者都能从中获得实用的技巧和最佳实践。 该书涵盖了Docker的各个方面,包括基础知识、容器管理、网络设置、数据管理、安全性、监视和调试等。每个章节都以一个具体的问题或需求开始,并提供了解决方案的详细步骤和代码示例。 这本书的一个重要特点是它的实用性。每个配方都针对特定的问题,并提供了详细的步骤和解释,使读者能够快速上手。读者可以根据自己的需求选择感兴趣的配方,并直接应用到他们的项目中。 另一个亮点是书中的创新性。作者不仅仅介绍了最基本的Docker功能,还分享了许多高级技巧和最新的工具。这些创新的配方将帮助读者更好地利用Docker的强大功能,提高他们的开发效率和部署质量。 总的来说,这本《Docker Cookbook: Over 100 Practical and Innovative Recipes to help you efficiently build, debug, and deploy modern applications with Docker》是一本实用而创新的Docker资源,适合所有对Docker感兴趣的开发者。无论是初学者还是有经验的专家,都能从中获得新的技能和知识,提高他们在使用Docker时的能力和效率。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值