Commit 0906380b by wangyuanfeng

测试脚本

parent 52aa7b8e
{
{
"id": "5c8b00b4-8ee3-445e-a4a5-5c1ad22fc0c2",
"name": "专享\b服务_manage",
"values": [
{
"key": "gateway-user",
"value": "https://usergwtest.bgycc.com",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "user_phone",
"value": "13535593630",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "exclusiveId",
"value": "2",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "access-Token",
"value": "ad7eae9d1e994c91b5f57a4415776f9d",
"enabled": true
},
{
"key": "townId",
"value": "1",
"description": "",
"enabled": true
},
{
"key": "userId",
"value": "176",
"type": "text",
"description": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-01-07T08:11:18.879Z",
"_postman_exported_using": "Postman/6.5.2"
}
\ No newline at end of file
{
{
"info": {
"_postman_id": "be57527f-0cf2-4960-b1c4-76f3b1b6ab47",
"name": "专享服务",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "用户登录",
"event": [
{
"listen": "test",
"script": {
"id": "ab616fda-d96b-4f71-a9aa-6c59ce279e71",
"exec": [
"// console.log(\"----------------responseBody--------------\"+responseBody);",
"var jsonData = JSON.parse(responseBody);",
"// console.log(\"----------------jsonData.data.accessToken--------------\"+jsonData.data.accessToken);",
"",
"if(jsonData.data !== null || jsonData.data !==\"\")",
"{",
" tests[\"accessToken\"] = true;",
" postman.setEnvironmentVariable(\"access-Token\",jsonData.data.accessToken);",
" ",
"}",
"else",
"{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"accessToken\"]=false;",
"}",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userPhone\": {{user_phone}},\n \"userPassword\": \"123456\",\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}"
},
"url": "{{gateway-user}}/app/login"
},
"response": []
},
{
"name": "查询专享服务详情",
"event": [
{
"listen": "test",
"script": {
"id": "48d06ac3-8967-4464-9f49-282ecb491a29",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/app/exclusive/getexclusive/{{exclusiveId}}"
},
"response": []
},
{
"name": "根据小镇id,分页查询所有专享服务列表",
"event": [
{
"listen": "test",
"script": {
"id": "9c7e9513-8bd8-4289-9690-e1fb32b884b5",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{gateway-user}}/app/exclusive/getallexclusive/townid/{{townId}}?p=1&c=10",
"host": [
"{{gateway-user}}"
],
"path": [
"app",
"exclusive",
"getallexclusive",
"townid",
"{{townId}}"
],
"query": [
{
"key": "p",
"value": "1"
},
{
"key": "c",
"value": "10"
}
]
}
},
"response": []
},
{
"name": "根据小镇id,查询最新五条专项服务",
"event": [
{
"listen": "test",
"script": {
"id": "931a30ec-2a3a-403f-b135-d5badd4c278e",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/app/exclusive/getnewexclusive/townid/{{townId}}"
},
"response": []
},
{
"name": "根据用户id查询,用户申请的专享服务",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"userId\":{{userId}},\n\t\"userName\":null\n}"
},
"url": {
"raw": "{{gateway-user}}/app/exclusive/getapplyexclusive?p=1&c=10",
"host": [
"{{gateway-user}}"
],
"path": [
"app",
"exclusive",
"getapplyexclusive"
],
"query": [
{
"key": "p",
"value": "1"
},
{
"key": "c",
"value": "10"
}
]
}
},
"response": []
},
{
"name": "用户申请专享受服务",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"exclusiveCompanyId\": 2,\n \"requestExplain\": \"这里是申请说明\"\n}"
},
"url": "{{gateway-user}}/app/exclusive/apply"
},
"response": []
}
]
}
\ No newline at end of file
{
{
"info": {
"_postman_id": "77d30c2a-abb1-4395-93ae-ea834025f44c",
"name": "项目管理",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "用户登录",
"event": [
{
"listen": "test",
"script": {
"id": "ab616fda-d96b-4f71-a9aa-6c59ce279e71",
"type": "text/javascript",
"exec": [
"// console.log(\"----------------responseBody--------------\"+responseBody);",
"var jsonData = JSON.parse(responseBody);",
"// console.log(\"----------------jsonData.data.accessToken--------------\"+jsonData.data.accessToken);",
"",
"if(jsonData.data !== null || jsonData.data !==\"\")",
"{",
" tests[\"accessToken\"] = true;",
" postman.setEnvironmentVariable(\"access-Token\",jsonData.data.accessToken);",
" ",
"}",
"else",
"{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"accessToken\"]=false;",
"}",
""
]
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"userPhone\": {{user_phone}},\n \"userPassword\": \"123456\",\n \"equipment\": \"c5d93c486a95d658\",\n \"channelId\": 1\n}"
},
"url": "{{gateway-user}}/app/login"
},
"response": []
},
{
"name": "获取\b已开启定位的小镇列表",
"event": [
{
"listen": "test",
"script": {
"id": "85fb0b83-9a26-4c2f-85c3-45f37e515df5",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"if(jsonData.data !== null)",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"id\":1\n}"
},
"url": "{{gateway-user}}/gps/list"
},
"response": []
},
{
"name": "获取小镇banner图",
"event": [
{
"listen": "test",
"script": {
"id": "b43e4f80-02de-46b1-bceb-48f5db6ee3b4",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"if(jsonData.data !== null)",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/banner/app/{{townId}}/{{blockType}}"
},
"response": []
},
{
"name": "获取所有城市及城市下的小镇信息",
"event": [
{
"listen": "test",
"script": {
"id": "33078fb7-2ac9-4e18-871f-5d3d85c96b4b",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"if(jsonData.code === \"0\")",
"if(jsonData.data !== null)",
"{",
" tests[\"code\"] = true;",
"}",
"else{",
" console.log(\"接口返回错误:\"+jsonData.msg);",
" tests[\"code\"+jsonData.msg]=false;",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "access-token",
"value": "{{access-Token}}",
"type": "text"
},
{
"key": "terminalId",
"value": "{{terminalId}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": ""
},
"url": "{{gateway-user}}/app/town/area"
},
"response": []
}
]
}
\ No newline at end of file
{
{
"id": "bb246012-ad02-47f6-8178-449536f2b002",
"name": "项目管理_manage",
"values": [
{
"key": "gateway-user",
"value": "https://usergwtest.bgycc.com",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "user_phone",
"value": "13535593630",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "access-Token",
"value": "91e8193009294a5cbde4036d8b43f6b2",
"enabled": true
},
{
"key": "townId",
"value": "1",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "blockType",
"value": "ENTERPRISE",
"description": {
"content": "",
"type": "text/plain"
},
"enabled": true
},
{
"key": "terminalId",
"value": "1",
"type": "text",
"description": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2019-01-07T08:10:25.961Z",
"_postman_exported_using": "Postman/6.5.2"
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment