The Way of Python Testing cover

The Way of Python Testing

Rating 3.5
Word count
238K words
Chapters
90
ISBN
9787115479518

Tags

Summary

This book is a technical guide for test engineers who want to use Python 3.6, the latest version of Python, to perform API automation and concurrent API testing tasks. API automation and concurrency testing are the most important testing methods for modern testers, and also a weak spot for most of them. To help testers clearly understand the relevant knowledge of API testing, this book starts from testing fundamentals and explains the technology to test engineers in accessible language through storytelling and examples, guiding testers to learn Python 3.6 programming techniques and the UnitTest testing framework. In the practical sections on API automation and concurrent API testing, multiple cases are built to help test engineers apply theories and testing frameworks in practice. Finally, the concept of continuous integration is introduced to help testers optimize the efficiency of executing API automation and concurrent testing tasks. In addition, the book shares lessons and experience accumulated by several testers in performing testing tasks, as well as an analysis and outlook on tester development from a testing recruiter's perspective. This is a testing technology book, and also an interesting one, suitable for test engineers and development engineers who want to learn about testing technology.

Editor's review

Published by Posts & Telecom Press in 2018, The Tao of Python Testing is a practical guide written by Yang Yanlin based on years of hands-on test development experience. The book holds a solid 8.0 rating on Douban, reflecting readers' recognition of its practicality. This is not an all-encompassing Python grammar textbook; its core value lies in precisely targeting the specialized field of "how to test software effectively with Python."

In terms of structure, the book systematically covers key areas including unit testing, integration testing, Web UI automation testing, API testing, and performance testing, with emphasis on the practical application of mainstream frameworks and tools such as unittest, pytest, Selenium, Requests, and Locust. The author's style is pragmatic, offering numerous operable code examples and project practice snippets that help readers quickly build their own testing engineering systems.

Its highlight is the combination of "tao" and "technique." On one hand, it explains modern testing concepts such as the test pyramid and continuous integration (tao); on the other, it delves into details, such as using pytest fixtures to manage test resources and the Page Object pattern to optimize UI automation scripts (technique). This structure particularly suits readers hoping to advance from "manual testing" or "script recording" to "engineered, systematized test development." For intermediate developers, the advanced content on customizing test frameworks and beautifying test reports is also valuable for reference.

Note that, given the time-sensitive nature of technical books, some tool versions mentioned may have been updated, and readers should consult the latest official documentation when practicing. However, the testing design philosophy and engineering methods the book expounds remain enduringly valuable and are still an excellent blueprint for building reliable testing systems.

Who it's for

A good fit for

  • Software test engineers with basic Python syntax knowledge who wish to transition into or deepen their expertise in test development.
  • Python backend or frontend developers with some development experience who need to write high-quality automated tests for their projects.
  • Computer science students or self-learners who want to consolidate and improve their Python engineering skills through a concrete application direction (testing).
  • Team technical leads or architects seeking references for building standardized, maintainable automated testing solutions and best practices.

Not a good fit for

  • Complete beginners with zero foundation in the Python programming language—study an introductory Python tutorial first.
  • Readers looking for extensive software testing theory or pure methodology research on test case design—this book focuses more on engineering practice.

Reading tips

  1. Read in chapter order; after the first three chapters establish the fundamentals, selectively study specialized chapters such as Web testing, API testing, or performance testing according to project needs.
  2. Be sure to practice the code examples hands-on while reading, and try applying them to a small real project of your own—this is key to mastering test development skills.
  3. Read alongside the latest official documentation for tools such as pytest and Selenium to learn about new features and evolving best practices.

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. 版权信息
  2. 内容提要
  3. 前言
  4. 第1章 大话软件测试基础
  5. 1.1 测试的分阶
  6. 1.2 并发测试
  7. 1.3 自动化测试
  8. 1.4 学习小贴士
  9. 第2章 Python的环境准备
  10. 2.1 Python介绍
  11. 2.2 Python的安装配置
  12. 2.3 Python模块的安装
  13. 2.4 Python的工具
  14. 2.5 学习小贴士
  15. 第3章 Python的基础
  16. 3.1 语法规范
  17. 3.2 变量与运算
  18. 3.3 数据结构
  19. 3.4 函数
  20. 3.5 字符串处理
  21. 3.6 学习小贴士
  22. 第4章 接口测试的基础
  23. 4.1 网络传输知识
  24. 4.2 HTTP协议
  25. 4.3 HTTPS协议详解
  26. 4.4 WebSocket协议详解
  27. 4.5 学习小贴士
  28. 第5章 模拟网络请求
  29. 5.1 发送HTTP请求
  30. 5.2 发送HTTPS请求
  31. 5.3 发送WebSocket请求
  32. 5.4 学习小贴士
  33. 第6章 接口测试
  34. 6.1 接口测试的定义
  35. 6.2 接口测试工具
  36. 6.3 接口文档
  37. 6.4 实例
  38. 6.5 学习小贴士
  39. 第7章 UnitTest测试框架
  40. 7.1 UnitTest模块
  41. 7.2 测试用例
  42. 7.3 测试固件
  43. 7.4 测试套件
  44. 7.5 运行测试
  45. 7.6 测试报告
  46. 7.7 学习小贴士
  47. 第8章 接口自动化测试
  48. 8.1 项目的选择
  49. 8.2 结构化设计
  50. 8.3 内置功能应用
  51. 8.4 实例
  52. 8.5 学习小贴士
  53. 第9章 接口并发测试
  54. 9.1 常见的并发问题
  55. 9.2 设计并发测试场景
  56. 9.3 并发结果测试与结论
  57. 9.4 多线程并发
  58. 9.5 实例
  59. 9.6 学习小贴士
  60. 第10章 接口自动化测试实战
  61. 10.1 实战1
  62. 10.2 实战2
  63. 10.3 学习小贴士
  64. 第11章 接口并发测试实战
  65. 11.1 订单并发性能
  66. 11.2 WebSocket并发
  67. 11.3 学习小贴士
  68. 第12章 Jenkins持续集成
  69. 12.1 什么是持续集成
  70. 12.2 持续集成工具Jenkins
  71. 12.3 Jenkins的安装运行
  72. 12.4 Jenkins的配置
  73. 12.5 Jenkins的构建任务
  74. 12.6 运行构建任务
  75. 12.7 学习小贴士
  76. 第13章 Python的其他用途
  77. 13.1 批量处理数据
  78. 13.2 本地命令集成
  79. 13.3 查看服务器日志
  80. 13.4 学习小贴士
  81. 第14章 测试人员的发展
  82. 14.1 测试人员的现状
  83. 14.2 测试人员的地位
  84. 14.3 测试人员的评审标准
  85. 14.4 测试人员的学习
  86. 14.5 测试人员的分享
  87. 14.6 Python对于测试人员的意义
  88. 14.7 测试人员的转型
  89. 14.8 学习小贴士
  90. 后记

FAQ

How much Python foundation does this book require?
You need to grasp basic Python syntax, common data structures, functions, and object-oriented programming concepts. If you can already write simple scripts and modules, you have the foundation needed to read this book.
How is this book different from a plain Selenium or pytest tutorial?
This book is not a manual for a single tool; from the perspective of a complete test engineer, it teaches you how to coordinate unittest, pytest, Selenium, Requests, and other tools to build a complete testing solution from unit to integration, with greater emphasis on engineering and systematization.
Are the cases and techniques in the book outdated now (2023 and later)?
The core testing concepts (such as layered testing and automated integration) and the basic principles of mainstream tools (pytest, Selenium) are not outdated. Some specific APIs or recommended usages of certain tools may have been updated, but the code approaches and project structures the book provides remain highly valuable for reference, and readers can easily migrate them to new versions.

Related on WeRead

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

杨燕琳 Author

Yang Yanlin, about whom limited public information is available, can currently be identified as an author of books on software learning, whose representative work is The Way of Python Testing. Judging from the title and the book's category, the work deals with the application of the Python language in the field of software testing and belongs to technical writing aimed at testing practice. Books of this kind are generally intended for developers and testers who wish to use Python to improve testing efficiency, and they often cover the ideas, tools, and code examples of automated testing, emphasizing practicality rather than purely theoretical discussion. On the basis of the available information, it is not possible to determine the author's educational background, professional experience, or other publications, so any overall assessment of her writing style should also remain cautious. What can be confirmed is that Yang Yanlin has entered readers' view with a work focused on the theme of Python testing, offering her own organization and expression of this细分 area of software learning, which has some reference value for Chinese readers interested in test automation.

朱圣洲 Author

Zhu Shengzhou, about whom public information is limited, is currently known mainly through a single work. His representative book is The Way of Python Testing, which falls under the common category of software learning and is aimed at readers who wish to understand and master knowledge and methods related to Python testing. Judging from the subject matter, the author focuses on the practical application of a programming language in the testing process, a direction that usually emphasizes operability and hands-on practice rather than abstract theory. Because only one work by this author is included in the database, his nationality, dates of birth and death, educational background, professional experience, and English name cannot be confirmed, so it would be inappropriate to infer too much about his personal life. Readers who come to know this author through The Way of Python Testing will approach him mainly through the testing ideas and technical content presented in the book rather than through external introductions. On the basis of the available material, Zhu Shengzhou's profile as a writer rests primarily on this software-learning title, and only further works or public information could add to a fuller picture of him.

石贇 Author

Shi Yun is an author about whom limited public information is available. The only confirmed work is The Way of Python Testing, which falls under the category of software learning. Judging from the title and category, the writing focuses on combining software testing with practical Python programming, aimed at developers and testers who want to use Python to improve testing efficiency. Since no reliable records exist regarding birth and death dates, nationality, education, or professional experience, this profile makes no speculation about the author's personal life. Based on the available work, Shi Yun's writing tends toward the practical, concentrating on specific methods and tool use in testing workflows rather than abstract theoretical exposition. Books on this topic have steady demand among Chinese technical readers, most of whom are newcomers or people changing roles, so this book can serve as one reference for learning about Python testing practice.

Top rated in the same category