Python Automated Testing in Practice cover

Python Automated Testing in Practice

Rating 3.2
Word count
64K words
Chapters
95
ISBN
9787121357046

Tags

Summary

This book focuses on Python and centers on today's most popular UI automation testing frameworks, the Appium mobile testing framework, and API automation testing. Starting from the very basics of Python, it gradually introduces the Python language and the Selenium framework, UI-based automation testing frameworks, and Python-based automation testing. The book is divided into three parts: the first introduces Selenium automation testing; the second covers API automation testing, including the HTTP protocol, detailed use of the Postman testing tool, and detailed use of JMeter in API testing. It covers automation testing knowledge across the board, from CI and data separation to testing frameworks and the challenging aspects of today's popular API testing. The content is thorough and covers every module in full, reflecting technical issues the author encountered at work and that clients raised and cared about.

Editor's review

Python Automation Testing in Practice is a hands-on technical guide. Using Python as its core tool, it systematically explains the entire process of automation testing, from fundamental theory to enterprise-level application. Unlike scattered tutorials on the market, this book builds a clear framework: from UI automation tools such as Selenium and Appium to API testing with the Requests library, and on to continuous integration and test report generation, forming a complete skills loop. Notably, the book includes practical cases of test-driven development and behavior-driven development, which are highly valuable references for teams hoping to integrate automation testing into agile development workflows. The author, Wu Ya, writes in a pragmatic style and avoids piling up flashy theory; every technical point comes with runnable code examples and analysis of common problems. For readers with some Python foundation who wish to advance into test development or quality assurance, the knowledge system and project practice in this book can effectively shorten the distance from learning to application. Of course, the book's emphasis is on practice and application, with less discussion of pure testing theory or academic research, a positioning readers should keep in mind when choosing it.

Who it's for

A good fit for

  • Beginners with basic Python syntax knowledge who wish to enter the field of automation testing
  • Test engineers with some manual testing experience who wish to improve their technical skills and make a career transition
  • Developers who want to understand testing processes and write high-quality test code to improve software quality
  • Team technical leads or project managers seeking reference material for building or optimizing an automation testing system

Not a good fit for

  • Readers with no programming background at all who want to learn Python from zero
  • Readers seeking advanced testing theory, academic research, or standardized certification content

Reading tips

  1. Reading in chapter order is recommended, especially the first few chapters on environment setup and basic frameworks, which are the foundation for later learning
  2. Be sure to practice the code examples in the book hands-on and try adapting them to projects or scenarios you are familiar with
  3. For chapters such as Continuous Integration and Test Reports, you can extend your learning with currently popular tools (e.g., Jenkins, Allure); the book provides good ideas for integration

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. 版权信息
  2. 内容简介
  3. 序1
  4. 序2
  5. 前言
  6. 第1部分 UI自动化测试
  7. 第1章 自动化测试概述
  8. 1.1 自动化测试的价值
  9. 1.2 自动化测试的应用
  10. 第2章 Selenium元素定位实战
  11. 2.1 Selenium简述
  12. 2.2 Selenium结合浏览器实战
  13. 2.3 元素定位实战
  14. 第3章 Selenium与页面的交互
  15. 3.1 WebDriver浏览器的属性
  16. 3.2 WebElement类的方法
  17. 3.3 下拉框实战
  18. 3.4 弹出框实战
  19. 3.5 WebDriverWait类实战
  20. 3.6 ActionChains类实战
  21. 3.7 键盘事件实战
  22. 3.8 JavaScript的处理
  23. 3.9 获取截图
  24. 第4章 单元测试框架unittest
  25. 4.1 unittest简述
  26. 4.2 测试固件
  27. 4.3 测试执行
  28. 4.4 构建测试套件
  29. 4.5 分离测试固件
  30. 4.6 测试断言
  31. 4.7 断言的注意事项
  32. 4.8 批量执行测试用例
  33. 4.9 生成测试报告
  34. 4.10 代码覆盖率统计实战
  35. 第5章 Jenkins实战
  36. 5.1 Jenkins简述及部署
  37. 5.2 Jenkins实战
  38. 第6章 数据驱动
  39. 6.1 ddt实战
  40. 6.2 Txt实战
  41. 6.3 Csv实战
  42. 6.4 Excel实战
  43. 6.5 Xml实战
  44. 6.6 MySQL实战
  45. 第7章 Page Objects实战
  46. 7.1 Page Objects的实现
  47. 7.2 Page Objects中引入wait
  48. 7.3 Page Objects引入工厂设计模式
  49. 第8章 UI自动化测试实战
  50. 8.1 Web产品的实战
  51. 第2部分 接口自动化测试
  52. 第9章 HTTP协议
  53. 9.1 HTTP简述
  54. 9.2 HTTP的状态码
  55. 9.3 Cookie的请求流程
  56. 9.4 Session的请求流程
  57. 9.5 Token的请求流程
  58. 第10章 序列化与反序列化
  59. 10.1 JSON库的应用
  60. 10.2 JSON库的实例实战
  61. 第11章 PostMan的应用
  62. 11.1 PostMan简述
  63. 11.2 PostMan实战
  64. 11.3 PostMan接口测试实战
  65. 第12章 JMeter接口测试应用
  66. 12.1 JMeter简述
  67. 12.2 JMeter的语言切换
  68. 12.3 JMeter的插件安装
  69. 12.4 WebServices的请求
  70. 12.5 HTTP的请求
  71. 12.6 JMeter断言实战
  72. 12.7 HTTP请求默认值
  73. 12.8 用户定义的变量
  74. 12.9 Token的获取实战
  75. 12.10 HTTP Cookie管理器实战
  76. 12.11 生成测试报告实战
  77. 12.12 自动发送邮件实战
  78. 12.13 引入CI
  79. 12.14 JMeter接口测试实战
  80. 第13章 Requests实战
  81. 13.1 Requests简述
  82. 13.2 Requests发送请求
  83. 13.3 URL参数实战
  84. 13.4 请求头的添加
  85. 13.5 data参数实战
  86. 13.6 JSON参数实战
  87. 13.7 Token实战
  88. 13.8 Session实战
  89. 13.9 Session会话对象
  90. 13.10 Requests鉴权实战
  91. 13.11 超时处理
  92. 13.12 文件下载
  93. 13.13 文件上传
  94. 13.14 Requests接口测试实战
  95. 主要参考文献

FAQ

Is this book suitable for testers who have never written code?
Not very suitable. The book assumes readers already know basic Python syntax (such as variables, functions, classes, and module imports). Readers with no foundation are advised to first gain introductory Python knowledge before reading this book.
Are the technology stack and cases in the book outdated?
The book is based on Python 3 and covers long-term stable and widely used testing frameworks and libraries such as Selenium and Pytest. Although minor versions of specific tools may be updated, the principles, framework design ideas, and integration methods explained in the book retain lasting reference value. Readers can consult official tool documentation for the latest API changes.
What are the main features of this book compared with similar titles?
Its features are its hands-on approach and systematic structure. It not only explains how to use individual tools but also focuses on how to combine various tools (UI automation, API testing, continuous integration) into a practical, deployable automation testing solution, and it provides practical cases close to real projects.

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

Wu Ya is an author about whom limited public information is available. The library currently holds two works by this author, spanning the distinct fields of programming and design and youth literature. Python Automated Testing in Practice suggests an interest in the engineering practice of software testing, with a focus on concrete techniques and hands-on operations for readers who want to apply automated testing in real projects. Letting Go, by contrast, turns to youth literature, addressing personal emotions and experiences of growing up. The considerable distance between these two works shows that the author has attempted both technical writing and literary expression. Since details such as dates of birth and death, nationality, education, and professional experience cannot be confirmed, this introduction makes no speculation and merely sketches the author's writing profile based on the available works and categories for readers' reference.

More by the same author

Top rated in the same category