课程大纲

本课再次使用线上接口测试网站https://httpbin.org/forms/post,演示操作,使用浏览器F12检查工具如何导出测试脚本到接口测试工具如postman、jmeter、metersphere,以及其他浏览器。

① **抓包:**鼠标右键打开"检查"工具(F12),tab导航选择"网络"(Network),我们输入如上图的数据,点击提交,可看到录制的请求和返回数据。

② 复制 curl **请求:**在请求行上,点击鼠标右键 - 选择"复制" - "以cURL格式复制"。

**③ 生成postman脚本:**打开postman - 点击界面"import" - 粘贴复制的内容,工具会自动识别。

识别后浮层展示,可以编辑请求内容、请求名称、选择目标Collection,确认无误,点击按钮"Import Into Collection"导入。

导入结果:
各部分均正确完整导入,调试成功。

**注意:**每次只能导入一个请求,下方"以cURL格式复制所有内容"的选项会复制列表所有请求,导入会出现错误。
