### 第 21 页 ｜ 基于API的TA工具
- 基于API的TA工具

### 第 22 页 ｜ 基于API的TA工具 -续
- 基于API的TA工具 -续
- Mockbin：可从HAR文件生成一个模拟桩 / RAP：淘宝开发的API管理工具 / Swagger：流行的API定义工具、规范 / Easy Mock：从swagger生成数据 / Doclever：编写REST接口文档，生成测试数据 / Mocky：无需登录，直接生成response / kristofa/mock-http-server / wiremock
- SoapUI / Rest-Assured / SOAtest / APIfortress

### 第 23 页 ｜ Rest-Assured
- Rest-Assured
- 23
- http://rest-assured.io/
- { "lotto": /    { "lottoId":5,  / "winning-numbers":[2,45,34,23,7,5,3], "winners":[  / {  / "winnerId":23, "numbers":[2,45,34,23,3,5]  / },  / { / "winnerId":54, "numbers":[52,3,12,11,18,22] /  }  / ] / } / }
- @Test public void lotto_resource_returns_200_with_expected_id_and_winners() /  {  / when().  / get("/lotto/{id}", 5).  / then().  / statusCode(200).  / body("lotto.lottoId", equalTo(5),  / "lotto.winners.winnerId", hasItems(23, 54));  / }
- http://localhost:8080/lotto/{id}
- REST-assured 是一个用于测试和验证RESTful服务的Java DSL, 使得为基于HTTP的RESTful服务编写测试变得更加简单
- https://github.com/rest-assured/rest-assured

### 第 24 页 ｜ Rest-Assured 参数化
- Rest-Assured 参数化
- given().  / formParam(“formParamName”, “value1”). queryParam(“queryParamName”, “value2”).  / when().  /       post(“/something”);
- 24
- given(). / param("param1", "value1"). / param("param2", "value2"). / when(). / get("/something");
- ..when().get("/name?firstName=John&lastName=Doe");

### 第 25 页 ｜ Rest-Assured + JUnit
- Rest-Assured + JUnit

### 第 26 页 ｜ REST API测试
- REST API测试

### 第 27 页 ｜ UI自动化测试
- UI自动化测试
- Web客户端的UI自动化测试 / 基于Cypress的UI自动化测试 / Android应用的UI自动化测试

### 第 28 页 ｜ Web UI的自动化测试
- Web UI的自动化测试
- 28
- Project name / Base URL
- 设定：
- 启动Chrome的插件 / Selenium IDE

### 第 29 页 ｜ Web UI的自动化测试 –续
- Web UI的自动化测试 –续
- 29

### 第 30 页 ｜ Selenium 支持不同脚本语言
- Selenium 支持不同脚本语言

### 第 31 页 ｜ Selenium + WebDriver
- Selenium + WebDriver

### 第 32 页 ｜ WebDriver 架构
- WebDriver 架构
- 32

### 第 33 页 ｜ UI Object
- UI Object

### 第 34 页 ｜ Page Objects
- Page Objects
- http://code.google.com/p/selenium/wiki/PageObjects

### 第 35 页 ｜ PageFactory
- PageFactory
- http://code.google.com/p/selenium/wiki/PageFactory

### 第 36 页 ｜ 基于Cypress的UI自动化测试
- 基于Cypress的UI自动化测试
- https://www.cypress.io/

### 第 37 页 ｜ Cypress 架构
- Cypress 架构

### 第 38 页 ｜ 安装和使用简单
- 安装和使用简单
- https://docs.cypress.io/_nuxt/videos/installing-cli.3465fe6.mp4
- 安装
- cd /your/project/path / npm install cypress --save-dev
- https://docs.cypress.io/guides
- 打开： npx cypress open

### 第 39 页 ｜ Cypress 脚本
- Cypress 脚本

### 第 40 页 ｜ Cypress执行
- Cypress执行