API Check分析

api check

postman (js runtime lib)

apizza simple

easy-mock (github)

postman

manage

workspace -- > colletions

exoprt and import(swagger1.0/2.0,curl)

runner ---> collection

develop console--debug

request

prescript

https://www.getpostman.com/docs/v6/postman/scripts/test_examples

proxy

environment(value/object/nest object)

reponse

test

https://www.getpostman.com/docs/v6/postman/scripts/test_exampleshttps://www.getpostman.com/docs/v6/postman/scripts/test_examples control the requestpostman.setNextRequest("request_name");

common lib

  • chai → v3.5.0
  • cheerio → v0.22.0
  • crypto-js → v3.1.9-1
  • csv-parse/lib/sync → 1.2.1
  • lodash → v4.17.4 (when used with require, the inbuilt _ object is for v3.10.1)
  • moment → v2.18.1 (sans locales)
  • postman-collection → v1.2.0
  • tv4 → v1.2.7
  • uuid → (the module loaded is a shim for original module)
  • xml2js → 0.4.19
uses

var atob = require('atob'),
_ = require('lodash'), 

arrayOfStrings,
base64Strings;

arrayOfStrings =  = ['string1', 'string2'];

base64Strings = _.map(arrayOfStrings, atob); 

console.log(base64Strings);

api desc

markdown

ci

new man

npm i -g newman

newman run hetao-console.postman_collection.json --environment hetao-console.postman_environment.json -r html

mock server

mock data

API

CASE:

1,发布时测试, 2,线上的API健康度监控

Feature
  1. 集合

  2. 导出collection,导出环境配置文件

  3. CLI: newman run

  4. document.cookie 导出cookie,添加到每个请求里面。需要建立domain,然后填充cookie.

    创建第一个request,其他的采用复制创建的方式。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值