Har是什么
Har即Http Archive,The HTTP Archive Tracks How the Web is Built。
We periodically crawl the top sites on the web and record detailed information about fetched resources, used web platform APIs and features, and execution traces of each page. We then crunch and analyze this data to identify trends — learn more about our methodology.
Har中详细描述了所有请求的细节,因此通过解析Har文件,可以实现录制回放接口自动化测试。
Har文件如何获得
通过抓包工具,以下以Fiddler工具为例,描述如何录制获取Har文件。
Har中详细描述了所有请求的细节,因此通过解析Har文件,可以实现录制回放接口自动化测试。
1.修改Fiddler配置
由于Fiddler默认配置抓取的Har文件的数据大小有限制,因此首先需要修改配置。在Fiddler的左左下角命令中中输入about:con