Python Web自动化测试入门与实战,从入门到入行
<p><strong>豆瓣高评分读书:</strong></p><p><img src="https://img2020.cnblogs.com/blog/1359074/202012/1359074-20201229122512541-1959708914.png" alt="" loading="lazy"></p>
<p> </p>
<p> </p>
<p>本书由一线测试工程师结合工作实践精心编撰。全书基于Python语言,从环境搭建、基础知识、常用框架、项目实战、持续集成等方面详细介绍了Web自动化测试的知识。全书共三篇14章,一篇(1~7章)为基础篇,介绍Python语言基础、Selenium和WebDriver的使用以及两个流行的单元测试框架UnitTest和Pytest;二篇(8章~10章)为实践篇,主要以数据驱动模型和PO模型为例介绍自动化测试项目的流程和应用;三篇(11章~14章)为卓异篇,介绍了测试人员如何拓展自己的知识面、提高项目代码质量的建议以及一些与自动化测试相关的面试题。 本书技术先进,通俗易懂,示例丰富,特别适合于想入行自动化测试岗位的初学者和在校学生,也适合掌握了一定的测试基础知识希望快速提升实战能力的读者使用。</p>
<h2>购买地址</h2>
<h4 style="margin-left: 30px">京东:https://item.jd.com/12656245.html</h4>
<h4 style="margin-left: 30px"><span style="font-size: 1em">当当:</span>http://product.dangdang.com/28551658.html</h4>
<h2>图书信息</h2>
<p><img src="https://img2020.cnblogs.com/blog/1359074/202005/1359074-20200515195932442-1897497876.png" alt="" width="269" height="268"></p>
<div style="margin-left: 30px"><span style="font-size: large"><span>作者:杨定佳</span></span></div>
<div style="margin-left: 30px"><span style="font-size: large"><span>定价:<span>79<span>元<br></span></span></span></span></div>
<p style="margin-left: 30px"><span style="font-size: large"><span>印次:1-1<br><span>ISBN:9787302552956<br><span>出版日期:2020.06.01<br><span>印刷日期:2020.04.23</span></span></span></span></span></p>
<h2><span style="font-size: large"><span> </span></span></h2>
<h2><span style="font-size: large"><span>作者简介</span></span></h2>
<p style="margin-left: 30px"><span style="font-size: large"><span>杨定佳,英文名Tynam,从事软件测试工作多年,目前就职于某外企。在自动化测试设计、框架搭建和开发中具有自己独特的见解。长期在IT博客圈分享软件测试与开发技术相关博文</span></span></p>
<h2 class="1" style="text-align: left" align="center">前 言</h2>
<p class="a0" style="margin-left: 30px">随着互联网的快速发展,软件研发模型越来越完善,软件质量也越来越受到各公司的重视,在这种情况下,软件测试技术特别是自动化测试技术在产品研发过程中扮演了极为重要的角色。自动化测试能够快速、全面地对软件进行测试,从而在保证产品质量的前提下进行软件的快速迭代。与此同时,软件测试岗位吸引了大量从业者。本书正是为满足初入自动化测试行业的从业者的需求而精心编撰。</p>
<p class="a0" style="margin-left: 30px">本书基于Python语言编写,对于Web自动化测试相关技术做了整体详细的介绍,从基础到提升、从理论到实践、从单个知识点到项目运用,既可以让读者快速上手又能够运用于实际项目,从而提高读者的实战技能。</p>
<h3 style="margin-left: 30px">本书结构</h3>
<p class="a0" style="margin-left: 30px">本书内容分为3大篇,共计14章。各部分内容概述如下:</p>
<p class="a0" style="margin-left: 30px">基础篇(第1章~第7章)—自动化测试基础知识。本篇主要讲述自动化测试人员需要掌握的基本知识,从代码使用层面进行介绍,包括Python基础、WebDriver API的使用及单元测试框架等知识。</p>
<p class="a0" style="margin-left: 30px">第1章~第3章是自动化测试的入门知识。第1章为开始自动化工作前的准备工作—环境搭建。第2章和第3章分别介绍Python的使用和WebDriver API的使用,掌握了基础知识后就能够编写一些简单的自动化测试脚本。</p>
<p class="a0" style="margin-left: 30px">第4章~第7章是学习完第1章~第3章入门知识后的进阶知识。第4章和第6章分别介绍了经常使用的两种单元测试框架UnitTest和Pytest,学完单元测试框架便可以对项目有个基本的构思。第5章介绍Selenium Grid分布式执行测试用例(好的项目还需要搭配高速的执行效率)。第7章介绍了Python的一些常用模块。</p>
<p class="a0" style="margin-left: 30px">基础篇主要是为自动化测试实践运用打下牢固的基础,适合初学自动化测试的人员学习。</p>
<p class="a0" style="margin-left: 30px">实践篇(第8章~第10章)—自动化测试项目实战。</p>
<p class="a0" style="margin-left: 30px">实践篇是在掌握了基础篇的基本知识后,在自动化测试项目的应用。从项目层面进行介绍,以数据驱动模型和PO模型为基础进行实战练习,然后进行持续集成操作。</p>
<p class="a0" style="margin-left: 30px">第8章使用数据驱动模型,从项目解析、框架搭建、用例组织、数据操作等几个方面进行介绍,主要使读者对数据驱动模型有一个认识,该模型在实际项目中会被经常使用。</p>
<p class="a0" style="margin-left: 30px">第9章使用PO模型,以一个简单的后台管理系统从项目解析、框架搭建、常用结构封装、页面封装、用例组织、设置项目入口等几个方面进行介绍。很多公司在项目中都会以PO模型为基础,混合数据驱动模型和其他的一些方式进行项目操作,建议读者对本章内容进行深入的学习。</p>
<p class="a0" style="margin-left: 30px">第10章介绍了目前最流行的持续集成工具Jenkins,对第9章产生的项目测试脚本进行持续集成,从项目创建、任务定时、邮件发送等几个方面进行实战应用。</p>
<p class="a0" style="margin-left: 30px">本篇属于项目实践篇,适合具有一定基础的自动化测试人员学习。学完实践篇,在项目解析、自动化框架搭建、模块封装、用例组织、测试报告生成和持续集成上,读者已经有一定程度的认知,由此便可以在中小型项目上进行实际操作。</p>
<p class="a0" style="margin-left: 30px">卓异篇(第11章~第14章)—拓展知识面并提高项目质量。</p>
<p class="a0" style="margin-left: 30px">卓异篇主要用来提高读者的知识面,一个完整的自动化测试项目不只是写好测试脚本,还需要一些辅助的知识技能,本篇将介绍6种测试模型、如何写一手高质量的代码和以GitHub为例讲解Git的基本使用,此外,还介绍了一些初级测试人员求职必备的面试题。</p>
<p class="a0" style="margin-left: 30px">第11章介绍的是5种基本自动化测试模型,即线性模型、模块化驱动模型、数据驱动模型、关键字驱动模型及行为驱动模型。</p>
<p class="a0" style="margin-left: 30px">第12章介绍如何提高自己的编码质量,从编码规范、项目层次结构、个人学习几个方面进行说明。</p>
<p class="a0" style="margin-left: 30px">第13章介绍了一个开源的分布式版本控制系统Git,并以GitHub为例介绍Git命令的使用。</p>
<p class="a0" style="margin-left: 30px">第14章精选了一些常见的自动化测试经典面试题,涵盖Python、Selenium和开放性三个方面,以帮助有求职需求的读者应对面试。</p>
<p class="a0" style="margin-left: 30px">卓异篇旨在拓展知识,不仅适合自动化测试人员,对于从事测试工作的从业者也同样适合。</p>
<h3 style="margin-left: 30px">本书特色</h3>
<p class="a2" style="margin-left: 30px">本书的特点主要体现在以下几方面:</p>
<p class="a" style="margin-left: 30px">l 内容编排循序渐进,从零基础开始到框架结构在项目中应用,针对Web自动化测试新手量身打造。</p>
<p class="a" style="margin-left: 30px">l 知识点全面,涵盖了Web自动化测试体系中的大部分知识点。从基础知识到框架结构、持续集成等都进行了讲解。</p>
<p class="a" style="margin-left: 30px">l 理论与应用结合,知识点讲解中整合了许多示例进行演示说明。</p>
<p class="a" style="margin-left: 30px">l 技术新,本书所讲解的知识都是目前比较流行的,用到的技术比较新。</p>
<p class="a" style="margin-left: 30px">l 代码丰富,实用性和系统性非常强。</p>
<p class="a" style="margin-left: 30px">l 示例代码开源,参考附录可获取开发示例源码。</p>
<p class="a" style="margin-left: 30px">l 项目实战应用,学完基础知识,可以在项目中进行实战练习,即学即用,迅速获得项目经验。</p>
<p class="a" style="margin-left: 30px">l 结合笔者实际经验进行示例讲解。</p>
<p class="a" style="margin-left: 30px">l 扩展性,学完本书后不但会运用本书技术还能够写出高质量的代码,并应对求职面试。</p>
<h3 style="margin-left: 30px">目标读者</h3>
<p class="a2" style="margin-left: 30px">本书主要适合以下读者:</p>
<p class="a" style="margin-left: 30px">l 希望进入自动化测试行业的人员。</p>
<p class="a" style="margin-left: 30px">l 在校学生。</p>
<p class="a" style="margin-left: 30px">l 自动化测试零基础的测试从业者。</p>
<p class="a" style="margin-left: 30px">l 有一定基础希望提升自己的测试从业者。</p>
<p class="a" style="margin-left: 30px">l 培训机构学员。</p>
<p class="a1" style="margin-left: 30px">希望读者通过阅读本书都能够快速进入Web自动化测试领域,对Web自动化测试有一个清晰地理解,并且具备承担Web自动化测试开发的能力。</p>
<p class="a0" style="margin-left: 30px">由于编者水平所限,书中难免存在错误或解释不到位的地方,恳请广大读者批评指正。</p>
<p class="a0" style="margin-left: 30px">联系邮箱:tynam.yang@gmail.com。</p>
<p class="a0" style="margin-left: 30px">2019年12月</p>
<h2> </h2>
<h2><span style="font-size: large"><span>图书目录</span></span></h2>
<p> 第一篇 基础篇</p>
<p style="margin-left: 30px"> 第1章 学习环境的搭建... 1</p>
<p style="margin-left: 30px"> 1.1 环境搭建... 1</p>
<p style="margin-left: 30px"> 1.1.1 Selenium简介... 2</p>
<p style="margin-left: 30px"> 1.1.2 Python简介... 3</p>
<p style="margin-left: 30px"> 1.1.3 Python的安装... 5</p>
<p style="margin-left: 30px"> 1.1.4 环境变量的设置... 6</p>
<p style="margin-left: 30px"> 1.1.5 Selenium的安装... 7</p>
<p style="margin-left: 30px"> 1.1.6 浏览器驱动的安装... 8</p>
<p style="margin-left: 30px"> 1.1.7 PyCharm的安装... 12</p>
<p style="margin-left: 30px"> 1.2 开始你的第一个项目... 15</p>
<p style="margin-left: 30px"> 第2章 Python基础... 18</p>
<p style="margin-left: 30px"> 2.1 基础语法... 18</p>
<p style="margin-left: 30px"> 2.1.1 打印... 18</p>
<p style="margin-left: 30px"> 2.1.2 编码... 19</p>
<p style="margin-left: 30px"> 2.1.3 数据类型... 20</p>
<p style="margin-left: 30px"> 2.1.4 变量... 21</p>
<p style="margin-left: 30px"> 2.1.5 注释... 21 </p>
<p style="margin-left: 30px">2.1.6 缩进... 22</p>
<p style="margin-left: 30px"> 2.2 运算符... 22</p>
<p style="margin-left: 30px"> 2.2.1 算术运算符... 22</p>
<p style="margin-left: 30px"> 2.2.2 比较运算符... 23</p>
<p style="margin-left: 30px"> 2.2.3 逻辑运算符... 23</p>
<p style="margin-left: 30px"> 2.2.4 Is 与 ==. 24</p>
<p style="margin-left: 30px"> 2.3 条件语句... 24</p>
<p style="margin-left: 30px"> 2.3.1 单项判断... 25</p>
<p style="margin-left: 30px"> 2.3.2 双向判断... 25</p>
<p style="margin-left: 30px"> 2.3.3 多项判断... 25</p>
<p style="margin-left: 30px"> 2.4 循环语句... 26</p>
<p style="margin-left: 30px"> 2.4.1 for语句... 26</p>
<p style="margin-left: 30px"> 2.4.2 while语句... 27</p>
<p style="margin-left: 30px"> 2.4.3 continue和break. 28</p>
<p style="margin-left: 30px"> 2.5 列表... 28</p>
<p style="margin-left: 30px"> 2.5.1 创建列表... 28</p>
<p style="margin-left: 30px"> 2.5.2 获取元素... 29</p>
<p style="margin-left: 30px"> 2.5.3 添加元素... 29</p>
<p style="margin-left: 30px"> 2.5.4 删除元素... 29</p>
<p style="margin-left: 30px"> 2.5.5 列表切片... 30</p>
<p style="margin-left: 30px"> 2.5.6 其他操作... 31</p>
<p style="margin-left: 30px"> 2.6 元组... 31</p>
<p style="margin-left: 30px"> 2.6.1 创建元组... 31</p>
<p style="margin-left: 30px"> 2.6.2 获取元素... 31</p>
<p style="margin-left: 30px"> 2.6.3 拼接元组... 32</p>
<p style="margin-left: 30px"> 2.6.4 删除元组... 32</p>
<p style="margin-left: 30px"> 2.6.5 其他操作... 32</p>
<p style="margin-left: 30px"> 2.7 字典... 33</p>
<p style="margin-left: 30px"> 2.7.1 创建字典... 33</p>
<p style="margin-left: 30px"> 2.7.2 获取元素... 33</p>
<p style="margin-left: 30px"> 2.7.3 修改元素... 33</p>
<p style="margin-left: 30px"> 2.7.4 删除元素... 34</p>
<p style="margin-left: 30px"> 2.7.5 其他操作... 34</p>
<p style="margin-left: 30px"> 2.8 集合... 34</p>
<p style="margin-left: 30px"> 2.8.1 创建集合... 35</p>
<p style="margin-left: 30px"> 2.8.2 添加元素... 35</p>
<p style="margin-left: 30px"> 2.8.3 移除元素... 35</p>
<p style="margin-left: 30px"> 2.8.4 其他操作... 36</p>
<p style="margin-left: 30px"> 2.9 推导式... 36</p>
<p style="margin-left: 30px"> 2.9.1 列表推导式... 36</p>
<p style="margin-left: 30px"> 2.9.2 字典推导式... 37</p>
<p style="margin-left: 30px"> 2.9.3 集合推导式... 37</p>
<p style="margin-left: 30px"> 2.10 生成器... 38</p>
<p style="margin-left: 30px"> 2.10.1 创建生成器... 38</p>
<p style="margin-left: 30px"> 2.10.2 send方法... 39</p>
<p style="margin-left: 30px"> 2.11 迭代器... 40</p>
<p style="margin-left: 30px"> 2.11.1 可迭代对象... 40</p>
<p style="margin-left: 30px"> 2.11.2 创建迭代器... 40</p>
<p style="margin-left: 30px"> 2.12 函数... 41</p>
<p style="margin-left: 30px"> 2.12.1 函数... 41</p>
<p style="margin-left: 30px"> 2.12.2 参数... 42</p>
<p style="margin-left: 30px"> 2.12.3 匿名函数... 45</p>
<p style="margin-left: 30px"> 2.12.4 参数类型... 45</p>
<p style="margin-left: 30px"> 2.12.5 返回值类型... 46</p>
<p style="margin-left: 30px"> 2.13 类和对象... 46</p>
<p style="margin-left: 30px"> 2.13.1 创建类... 46</p>
<p style="margin-left: 30px"> 2.13.2 创建实例对象... 47</p>
<p style="margin-left: 30px"> 2.13.3 类的私有化... 48</p>
<p style="margin-left: 30px"> 2.13.4 类继承... 49</p>
<p style="margin-left: 30px"> 2.13.5 类的重写... 51</p>
<p style="margin-left: 30px"> 2.14 模块... 52</p>
<p style="margin-left: 30px"> 2.14.1 模块的分类... 52</p>
<p style="margin-left: 30px"> 2.14.2 模块的导入... 52</p>
<p style="margin-left: 30px"> 2.15 作用域... 53</p>
<p style="margin-left: 30px"> 2.16 异常机制... 54</p>
<p style="margin-left: 30px"> 2.16.1 try-except 54</p>
<p style="margin-left: 30px"> 2.16.2 else. 55</p>
<p style="margin-left: 30px"> 2.16.3 finally. 56</p>
<p style="margin-left: 30px"> 2.17 __init__.py文件... 56</p>
<p style="margin-left: 30px"> 2.18 Python实用技巧... 57</p>
<p style="margin-left: 30px"> 第3章 Selenium WebDriver 62</p>
<p style="margin-left: 30px"> 3.1 WebDriver 简介... 62</p>
<p style="margin-left: 30px"> 3.1.1 WebDriver的特点... 62</p>
<p style="margin-left: 30px"> 3.1.2 常用WebDriver 63</p>
<p style="margin-left: 30px"> 3.2 源码中查找元素... 63</p>
<p style="margin-left: 30px"> 3.2.1 查看网页源码... 63</p>
<p style="margin-left: 30px"> 3.2.2 查找元素的属性... 64</p>
<p style="margin-left: 30px"> 3.3 元素定位... 65</p>
<p style="margin-left: 30px"> 3.3.1 id定位... 68</p>
<p style="margin-left: 30px"> 3.3.2 class定位... 68</p>
<p style="margin-left: 30px"> 3.3.3 name定位... 69</p>
<p style="margin-left: 30px"> 3.3.4 tag定位... 70</p>
<p style="margin-left: 30px"> 3.3.5 xPath定位... 70</p>
<p style="margin-left: 30px"> 3.3.6 link定位... 71</p>
<p style="margin-left: 30px"> 3.3.7 Partial link定位... 72</p>
<p style="margin-left: 30px"> 3.3.8 CSS选择器定位... 72</p>
<p style="margin-left: 30px"> 3.3.9 By定位... 73</p>
<p style="margin-left: 30px"> 3.3.10 确认元素的唯一性... 74</p>
<p style="margin-left: 30px"> 3.4 定位一组元素... 76</p>
<p style="margin-left: 30px"> 3.5 浏览器操作... 78</p>
<p style="margin-left: 30px"> 3.5.1 浏览器最大化... 78</p>
<p style="margin-left: 30px"> 3.5.2 设置浏览器的宽和高... 78</p>
<p style="margin-left: 30px"> 3.5.3 访问网页... 78</p>
<p style="margin-left: 30px"> 3.5.4 浏览器后退... 79</p>
<p style="margin-left: 30px"> 3.5.5 浏览器前进... 79</p>
<p style="margin-left: 30px"> 3.5.6 刷新页面... 80</p>
<p style="margin-left: 30px"> 3.5.7 关闭浏览器当前窗口... 80</p>
<p style="margin-left: 30px"> 3.5.8 结束进程... 80</p>
<p style="margin-left: 30px"> 3.5.9 获取页面 title. 81</p>
<p style="margin-left: 30px"> 3.5.10 获取当前页面的URL. 81</p>
<p style="margin-left: 30px"> 3.5.11 获取页面源码... 82</p>
<p style="margin-left: 30px"> 3.5.12 切换浏览器窗口... 83</p>
<p style="margin-left: 30px"> 3.5.13 滚动条操作... 86</p>
<p style="margin-left: 30px"> 3.6 对象操作... 88</p>
<p style="margin-left: 30px"> 3.6.1 单击对象... 89</p>
<p style="margin-left: 30px"> 3.6.2 输入内容... 89</p>
<p style="margin-left: 30px"> 3.6.3 清空内容... 90</p>
<p style="margin-left: 30px"> 3.6.4 提交表单... 90</p>
<p style="margin-left: 30px"> 3.6.5 获取文本内容... 90</p>
<p style="margin-left: 30px"> 3.6.6 获取对象属性值... 91</p>
<p style="margin-left: 30px"> 3.6.7 对象显示状态... 91</p>
<p style="margin-left: 30px"> 3.6.8 对象编辑状态... 94</p>
<p style="margin-left: 30px"> 3.6.9 对象选择状态... 95</p>
<p style="margin-left: 30px"> 3.7 键盘操作... 96</p>
<p style="margin-left: 30px"> 3.7.1 send_keys 操作... 96</p>
<p style="margin-left: 30px"> 3.7.2 keyUp/keyDown 操作... 98</p>
<p style="margin-left: 30px"> 3.8 鼠标操作... 99</p>
<p style="margin-left: 30px"> 3.8.1 鼠标右击... 99</p>
<p style="margin-left: 30px"> 3.8.2 鼠标双击... 99</p>
<p style="margin-left: 30px"> 3.8.3 鼠标悬停... 100</p>
<p style="margin-left: 30px"> 3.8.4 鼠标拖放... 100</p>
<p style="margin-left: 30px"> 3.8.5 鼠标其他事件... 101</p>
<p style="margin-left: 30px"> 3.9 下拉框操作... 101</p>
<p style="margin-left: 30px"> 3.10 特殊Dom结构操作... 103</p>
<p style="margin-left: 30px"> 3.10.1 Windows弹窗... 103</p>
<p style="margin-left: 30px"> 3.10.2 非Windows弹窗... 106</p>
<p style="margin-left: 30px"> 3.10.3 frame与iframe. 108</p>
<p style="margin-left: 30px"> 3.11 文件上传操作... 110</p>
<p style="margin-left: 30px"> 3.11.1 直接上传... 110</p>
<p style="margin-left: 30px"> 3.11.2 使用AutoIt上传... 112</p>
<p style="margin-left: 30px"> 3.11.3 使用WinSpy上传... 115</p>
<p style="margin-left: 30px"> 3.12 文件下载操作... 119</p>
<p style="margin-left: 30px"> 3.12.1 手动修改... 119</p>
<p style="margin-left: 30px"> 3.12.2 通过options修改... 119</p>
<p style="margin-left: 30px"> 3.13 WebDriver的高级特性... 120</p>
<p style="margin-left: 30px"> 3.13.1 cookie操作... 120</p>
<p style="margin-left: 30px"> 3.13.2 JavaScript调用... 122</p>
<p style="margin-left: 30px"> 3.13.3 屏幕截图... 122</p>
<p style="margin-left: 30px"> 3.14 时间等待... 123</p>
<p style="margin-left: 30px"> 3.14.1 强制等待... 123</p>
<p style="margin-left: 30px"> 3.14.2 隐式等待... 124</p>
<p style="margin-left: 30px"> 3.14.3 显式等待... 124</p>
<p style="margin-left: 30px"> 3.15 其他设置... 125</p>
<p style="margin-left: 30px"> 3.15.1 限制页面加载时间... 125</p>
<p style="margin-left: 30px"> 3.15.2 获取环境信息... 126</p>
<p style="margin-left: 30px"> 3.15.3 非W3C标准命令... 127</p>
<p style="margin-left: 30px"> 3.16 配置Chrome浏览器... 127</p>
<p style="margin-left: 30px"> 3.17 SSL证书错误处理... 129</p>
<p style="margin-left: 30px"> 第4章 UnitTest测试框架... 131</p>
<p style="margin-left: 30px"> 4.1 UnitTest简介... 131</p>
<p style="margin-left: 30px"> 4.2 TestFixture. 132</p>
<p style="margin-left: 30px"> 4.3 TestCase. 133</p>
<p style="margin-left: 30px"> 4.4 断言Assert 135</p>
<p style="margin-left: 30px"> 4.5 TestSuit 137</p>
<p style="margin-left: 30px"> 4.5.1 TestSuite直接构建测试集... 137</p>
<p style="margin-left: 30px"> 4.5.2 addTest( )构建测试集... 138</p>
<p style="margin-left: 30px"> 4.5.3 addTests( )构建测试集... 139</p>
<p style="margin-left: 30px"> 4.5.4 skip装饰器... 139</p>
<p style="margin-left: 30px"> 4.6 TestLoader 140</p>
<p style="margin-left: 30px"> 4.7 TestRunner 142</p>
<p style="margin-left: 30px"> 4.8 生成HTML报告... 143</p>
<p style="margin-left: 30px"> 第5章 Selenium Grid. 145</p>
<p style="margin-left: 30px"> 5.1 Selenium Grid简介... 145</p>
<p style="margin-left: 30px"> 5.2 Selenium Grid的工作原理... 145</p>
<p style="margin-left: 30px"> 5.3 Selenium Grid测试环境的搭建... 146</p>
<p style="margin-left: 30px">5.3.1 文件准备... 146</p>
<p style="margin-left: 30px">5.3.2 部署Hub节点... 147</p>
<p style="margin-left: 30px">5.3.3 部署Node节点... 148 </p>
<p style="margin-left: 30px">5.4 测试脚本开发... 149</p>
<p style="margin-left: 30px">5.4.1 指定Node节点... 149</p>
<p style="margin-left: 30px">5.4.2 指定Hub地址... 150</p>
<p style="margin-left: 30px">第6章 Pytest测试框架... 152</p>
<p style="margin-left: 30px">6.1 Pytest简介... 152</p>
<p style="margin-left: 30px">6.2 Console参数... 154</p>
<p style="margin-left: 30px">6.2.1 实例初体验... 154</p>
<p style="margin-left: 30px">6.2.2 -v参数... 155</p>
<p style="margin-left: 30px">6.2.3 -h参数... 156</p>
<p style="margin-left: 30px">6.2.4 其他参数... 156</p>
<p style="margin-left: 30px">6.3 mark标记... 157</p>
<p style="margin-left: 30px">6.3.1 标记测试函数... 157</p>
<p style="margin-left: 30px">6.3.2 示例说明... 158</p>
<p style="margin-left: 30px">6.3.3 直接标记... 163</p>
<p style="margin-left: 30px">6.3.4 模糊匹配标记... 165</p>
<p style="margin-left: 30px">6.3.5 使用mark自定义标记... 166</p>
<p style="margin-left: 30px">6.4 固件 Fixture. 167 </p>
<p style="margin-left: 30px">6.4.1 Fixture的使用... 167</p>
<p style="margin-left: 30px">6.4.2 Fixure的作用域... 168</p>
<p style="margin-left: 30px">6.4.3 autouse(自动使用)... 170 </p>
<p style="margin-left: 30px">6.4.4 yield的使用... 171</p>
<p style="margin-left: 30px">6.4.5 共享Fixture功能... 173</p>
<p style="margin-left: 30px">6.4.6 参数化... 175</p>
<p style="margin-left: 30px">6.4.7 内置Fixture. 176</p>
<p style="margin-left: 30px">6.5 Pytest插件... 182</p>
<p style="margin-left: 30px">6.5.1 插件的安装与卸载... 182</p>
<p style="margin-left: 30px">6.5.2 查看活动插件... 183</p>
<p style="margin-left: 30px">6.5.3 插件的注销... 184</p>
<p style="margin-left: 30px">6.6 Allure测试报告... 184</p>
<p style="margin-left: 30px">6.6.1 Allure的安装... 184 </p>
<p style="margin-left: 30px">6.6.2 脚本应用... 186</p>
<p style="margin-left: 30px">6.6.3 报告生成... 186</p>
<p style="margin-left: 30px">第7章 Python脚本开发常用模块... 189</p>
<p style="margin-left: 30px">7.1 日期和时间模块time和datetime. 189</p>
<p style="margin-left: 30px">7.2 文件和目录模块os 190</p>
<p style="margin-left: 30px">7.3 系统功能模块sys 191</p>
<p style="margin-left: 30px">7.4 导入第三方模块pip. 192 </p>
<p style="margin-left: 30px">7.5 邮件模块smtplib. 195</p>
<p style="margin-left: 30px">7.5.1 开启邮箱SMTP服务... 195</p>
<p style="margin-left: 30px">7.5.2 smtplib模块的使用... 196</p>
<p style="margin-left: 30px">7.6 日志模块logging. 199 </p>
<p style="margin-left: 30px">7.7 CSV文件读写模块csv. 201</p>
<p style="margin-left: 30px">7.8 Excel操作模块openpyxl 203</p>
<p style="margin-left: 30px">7.9 MySQL数据库操作包pymysql 205</p>
<p style="margin-left: 30px">7.9.1 简单使用... 206</p>
<p style="margin-left: 30px">7.9.2 获取查询数据... 207</p>
<p style="margin-left: 30px">7.9.3 增删改数据... 209</p>
<p style="margin-left: 30px">7.10 JSON数据... 210</p>
<p style="margin-left: 30px">7.10.1 JSON语法... 210 </p>
<p style="margin-left: 30px">7.10.2 Python读写JSON.. 211</p>
<p style="margin-left: 30px">7.11 多线程模块threading. 212</p>
<p> 第二篇 实践篇 </p>
<p style="margin-left: 30px">第8章 数据驱动模型及项目应用... 215</p>
<p style="margin-left: 30px">8.1 数据驱动简介... 215</p>
<p style="margin-left: 30px">8.2 ddt的使用... 216 </p>
<p style="margin-left: 30px">8.2.1 ddt的安装... 216</p>
<p style="margin-left: 30px">8.2.2 ddt的常用方法... 216</p>
<p style="margin-left: 30px">8.2.3 实例... 217</p>
<p style="margin-left: 30px">8.3 项目解析... 218</p>
<p style="margin-left: 30px">8.4 框架搭建... 220 </p>
<p style="margin-left: 30px">8.5 设计测试用例... 221</p>
<p style="margin-left: 30px">8.6 数据文件操作... 222</p>
<p style="margin-left: 30px">8.7 测试用例生成... 225</p>
<p style="margin-left: 30px">8.7.1 Excel数据处理... 225</p>
<p style="margin-left: 30px">8.7.2 测试步骤... 226</p>
<p style="margin-left: 30px">8.7.3 断言处理... 227</p>
<p style="margin-left: 30px">8.7.4 使用ddt生成测试用例... 228</p>
<p style="margin-left: 30px">8.8 测试执行... 229</p>
<p style="margin-left: 30px">第9章 PO模型——一个测试项目的实现... 231</p>
<p style="margin-left: 30px">9.1 项目解析... 231</p>
<p style="margin-left: 30px">9.1.1 主页... 232 </p>
<p style="margin-left: 30px">9.1.2 关于我们页面... 233</p>
<p style="margin-left: 30px">9.1.3 退出登录... 233</p>
<p style="margin-left: 30px">9.2 框架搭建... 233</p>
<p style="margin-left: 30px">9.3 配置文件... 235</p>
<p style="margin-left: 30px">9.4 常用结构的封装... 236</p>
<p style="margin-left: 30px">9.4.1 判断元素存在... 236 </p>
<p style="margin-left: 30px">9.4.2 Tab切换... 236</p>
<p style="margin-left: 30px">9.4.3 多级菜单... 239</p>
<p style="margin-left: 30px">9.4.4 表格结构... 241</p>
<p style="margin-left: 30px">9.4.5 分页... 244</p>
<p style="margin-left: 30px">9.5 页面封装... 246</p>
<p style="margin-left: 30px">9.5.1 基础页面... 246</p>
<p style="margin-left: 30px">9.5.2 登录页面... 248</p>
<p style="margin-left: 30px">9.5.3 主页页面... 251 </p>
<p style="margin-left: 30px">9.5.4 关于我们页面... 257</p>
<p style="margin-left: 30px">9.5.5 退出登录功能... 257</p>
<p style="margin-left: 30px">9.6 测试用例生成... 257</p>
<p style="margin-left: 30px">9.6.1 登录功能的测试用例... 257</p>
<p style="margin-left: 30px">9.6.2 主页页面测试用例... 258 </p>
<p style="margin-left: 30px">9.6.3 关于我们页面的测试用例... 260</p>
<p style="margin-left: 30px">9.6.4 退出登录功能的测试用例... 260</p>
<p style="margin-left: 30px">9.7 测试用例的组织... 261</p>
<p style="margin-left: 30px">9.8 设置项目入口... 262</p>
<p style="margin-left: 30px">第10章 持续集成在自动化测试中的应用... 264</p>
<p style="margin-left: 30px">10.1 Jenkins的安装... 264</p>
<p style="margin-left: 30px">10.1.1 Jenkins的下载... 264</p>
<p style="margin-left: 30px">10.1.2 安装... 265</p>
<p style="margin-left: 30px">10.1.3 创建管理员用户... 267</p>
<p style="margin-left: 30px">10.2 创建项目... 267</p>
<p style="margin-left: 30px">10.3 任务定时... 269 </p>
<p style="margin-left: 30px">10.3.1 任务定时构建的设置... 269</p>
<p style="margin-left: 30px">10.3.2 设置说明... 270</p>
<p style="margin-left: 30px">10.3.3 构建实例... 271</p>
<p style="margin-left: 30px">10.4 邮件发送... 271</p>
<p style="margin-left: 30px">10.4.1 插件安装... 271</p>
<p style="margin-left: 30px">10.4.2 HTML 报告配置... 273</p>
<p style="margin-left: 30px">10.4.3 邮件配置... 275</p>
<p style="margin-left: 30px"> </p>
<p>第三篇 卓异篇</p>
<p style="margin-left: 30px">第11章 自动化测试模型... 279 </p>
<p style="margin-left: 30px">11.1 自动化测试模型简介... 279</p>
<p style="margin-left: 30px">11.2 线性模型... 281</p>
<p style="margin-left: 30px">11.3 模块化驱动模型... 282</p>
<p style="margin-left: 30px">11.4 数据驱动模型... 282 </p>
<p style="margin-left: 30px">11.5 关键字驱动模型... 282</p>
<p style="margin-left: 30px">11.6 混合驱动模型... 283</p>
<p style="margin-left: 30px">11.7 行为驱动模型... 283</p>
<p style="margin-left: 30px">11.7.1 安装Behave. 284</p>
<p style="margin-left: 30px">11.7.2 Behave的使用... 286</p>
<p style="margin-left: 30px">11.7.3 运行... 288 </p>
<p style="margin-left: 30px">11.7.4 生成测试报告... 289</p>
<p style="margin-left: 30px">第12章 高质量代码的编写... 291</p>
<p style="margin-left: 30px">12.1 编码规范... 291</p>
<p style="margin-left: 30px">12.2 分层与结构... 294</p>
<p style="margin-left: 30px">12.3 阅读源码的技巧... 295</p>
<p style="margin-left: 30px">12.3.1 分析层次... 295</p>
<p style="margin-left: 30px">12.3.2 分析结构... 296</p>
<p style="margin-left: 30px">12.3.3 分析具体文件... 296</p>
<p style="margin-left: 30px">12.4 持续学习... 298</p>
<p style="margin-left: 30px">第13章 用Git管理项目... 299</p>
<p style="margin-left: 30px">13.1 Git简介... 299</p>
<p style="margin-left: 30px">13.2 安装Git 300</p>
<p style="margin-left: 30px">13.3 Git的配置... 301</p>
<p style="margin-left: 30px">13.3.1 配置用户信息... 301</p>
<p style="margin-left: 30px">13.3.2 文本编辑器配置... 301</p>
<p style="margin-left: 30px">13.3.3 配置差异分析工具... 301</p>
<p style="margin-left: 30px">13.3.4 查看配置信息... 302</p>
<p style="margin-left: 30px">13.4 常用命令... 302</p>
<p style="margin-left: 30px">13.5 GitHub. 304</p>
<p style="margin-left: 30px">13.5.1 账号注册... 304</p>
<p style="margin-left: 30px">13.5.2 创建仓库... 306</p>
<p style="margin-left: 30px">13.5.3 上传项目... 307</p>
<p style="margin-left: 30px">13.5.4 Jenkins与Git 308</p>
<p style="margin-left: 30px">第14章 精选面试题... 310</p>
<p style="margin-left: 30px">14.1 Python题... 310</p>
<p style="margin-left: 30px">14.2 Selenium题... 317 </p>
<p style="margin-left: 30px">14.3 开放性题... 321</p>
<p style="margin-left: 30px">附录1 示例代码... 324</p>
<p style="margin-left: 30px">附录2 项目搭建... 327 </p>
<p style="margin-left: 30px">参考文献... 330</p>
<p style="margin-left: 30px"> </p><br><br>
来源:https://www.cnblogs.com/tynam/p/12886494.html
頁:
[1]