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,其他的采用复制创建的方式。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Postman helps you develop APIs faster. 豪华午餐 Postman 构建、管理...
    Yuan_Jie阅读 31,176评论 36 134
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,267评论 19 139
  • 一、Pre Request Scripts Postman v0.10+ 版本支持pre-request scri...
    常大鹏阅读 68,689评论 4 69
  • 当你变得越来越好,生活得越来越好,避免不了一些人的“非议”,无谓,无所谓,即可。 精彩自己活出来的,而不是别人...
    SkiesG阅读 1,328评论 0 0
  • 有时候,你的心里总是特别乱 会纠结于某一道怎么也解不开的冷门题目;会懊恼那些被自己荒废的学习时间;会突然脑补出一个...
    拾柒染染阅读 3,047评论 0 0

友情链接更多精彩内容