api-tests-basic.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {
  2. "info": {
  3. "_postman_id": "5b90b987-503f-484c-b8d7-a0974674e95d",
  4. "name": "api-tests-basic",
  5. "description": "Auto test for Jenkins",
  6. "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
  7. "_exporter_id": "3170378"
  8. },
  9. "item": [
  10. {
  11. "name": "登录",
  12. "event": [
  13. {
  14. "listen": "test",
  15. "script": {
  16. "exec": [
  17. "var result = pm.response.json();",
  18. "pm.environment.set(\"api-login-id\", result.LoginId);"
  19. ],
  20. "type": "text/javascript",
  21. "packages": {},
  22. "requests": {}
  23. }
  24. }
  25. ],
  26. "request": {
  27. "auth": {
  28. "type": "noauth"
  29. },
  30. "method": "POST",
  31. "header": [
  32. {
  33. "key": "LanguageId",
  34. "value": "{{api-language}}",
  35. "description": "客户端语言别,0:简体 1:繁体 2:英文"
  36. },
  37. {
  38. "key": "Authorization",
  39. "value": "{{api-authorization}}",
  40. "description": "\"Basic MTBYWF8wMTo=\" 为\"10XX_01:\"的BASE64加密字符串,如在POSTMAN中的Authorization部分选择Basic Auth填入用户名+密码则不需在此传值"
  41. },
  42. {
  43. "key": "ClientType",
  44. "value": "{{api-client-type}}",
  45. "description": "用户自定义的客户端识别号,比如客户是WMS系统,可以自定义ClientType=“WMS”"
  46. },
  47. {
  48. "key": "Content-Type",
  49. "value": "{{api-content-type}}"
  50. },
  51. {
  52. "key": "X-Tiansi-Auth-Bypass",
  53. "value": "{{api-x-tiansi-bypass}}",
  54. "description": "跳过接口注册检验",
  55. "type": "text"
  56. },
  57. {
  58. "key": "sn",
  59. "value": "{{api-sn}}",
  60. "type": "text"
  61. }
  62. ],
  63. "url": {
  64. "raw": "{{api-url}}/User/login",
  65. "host": [
  66. "{{api-url}}"
  67. ],
  68. "path": [
  69. "User",
  70. "login"
  71. ]
  72. },
  73. "description": "用户登录"
  74. },
  75. "response": []
  76. }
  77. ],
  78. "event": [
  79. {
  80. "listen": "prerequest",
  81. "script": {
  82. "type": "text/javascript",
  83. "packages": {},
  84. "requests": {},
  85. "exec": [
  86. ""
  87. ]
  88. }
  89. },
  90. {
  91. "listen": "test",
  92. "script": {
  93. "type": "text/javascript",
  94. "packages": {},
  95. "requests": {},
  96. "exec": [
  97. ""
  98. ]
  99. }
  100. }
  101. ]
  102. }