tgt-pkg
IEG网站质量测试通用模块
安装:
$ npm install --save tgt-pkg
用法:
const tgtest = ;
测试
通用测试
mocha test/test.js
可用性测试
mocha test/ux.js
检测:
proCheck.json
proCheck方法,检查集成html和请求的json数据流,格式:tgtest
proCheck方法兼容callback和Promise
check.json
- check方法 (tgtest主模块所用检查函数) 检查file文件及请求文件,请求文件格式:- scoreCheck方法 (评分模块检查函数,参数和回调格式与procheck保持一致)
- monitorCheck方法 (监测模块检查函数,参数和回调格式与procheck保持一致)
tgtest
回调:
//cb.checkResult:/*** 页面是否是标准页面 @type*/pageStandard:"ture"/*** 页面跳过的检查项:all、title、charset、keywords、description、ping、isbn*/ignore:"none"/*** 页面地址*/url:"http://game.qq.com"/*** 是否为开发接口拉取的数据 @type*/openapi:"true"/*** 错误列表* @typedef* @property* @property* @property* @property*/list:"error_id": 1002"error_info": "无法检测到页面编码""pass_info": "页面编码正常""name":"编码""error_id": "custom_file_1""error_info": "个度:122""pass_info": "页面编码正常""name": "div标签"