Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.15 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.15 KB

使用python实现简单的测试工具

  1. 使用命令行发送get请求并打印返回
  2. 简单的ui测试工具
  3. 检查页面是否有无效链接的工具
  4. unittest动态定义用例运行
  5. 简单的动态配置mock server

API

simple_server

  • GET /ping
  • GET /user

jwt_server

# login
http -v --json POST localhost:8000/login username=admin password=admin

# refresh token
http -v -f GET localhost:8000/auth/refresh_token "Authorization:Bearer xxxxxxxxx"  "Content-Type: application/json"

# login success
http -f GET localhost:8000/auth/hello "Authorization:Bearer xxxxxxxxx"  "Content-Type: application/json"

# login success but authorization failed 
http -f GET localhost:8000/auth/hello "Authorization:Bearer xxxxxxxxx"  "Content-Type: application/json"