rn-debug-tool
v1.1.5
Published
<!-- * @Author: yuta * @Date: 2021-06-29 14:13:17 * @LastEditTime: 2021-06-29 14:38:19 * @LastEditors: yuta --> ## 一款RN debug tool, 目前有http log日志查看,线路切换(服务器路线),方便测试人员对bug进行定位,开发不再是对bug进行黑盒测试。
Readme
一款react native debug 测试工具
功能点
- 支持APP显示Http请求日志
- 支持App连接服务器环境切换 方便测试人员对bug进行定位,开发不再是对bug进行黑盒测试。
安装
npm install rn-debug-tool --save
or yarn add rn-debug-tool
用法
初始化工具: DebugManager.openTool()
Http请求日志功能:支持在使用axios库时,将得到的response响应数据传入DebugManager中的LogManager类里的appendHttpLogs方法 DebugManager.LogManager.appendHttpLogs(response) //添加响应请求到debug管理类
初始化服务器线路切换功能:DebugManager.ServerUrlManager.initServerUrlMap(urlList); // 初始化线路数据
urlList是数组例如
const urlList = [
{title: '线路1', host: '域名1'},
{title: '线路2', host: '域名2'},
]
切换设置域名: DebugManager.ServerUrlManager.setHost(host);
