|
|
definitions:
|
|
|
models.Response:
|
|
|
properties:
|
|
|
code:
|
|
|
type: integer
|
|
|
data: {}
|
|
|
msg:
|
|
|
type: string
|
|
|
type: object
|
|
|
info:
|
|
|
contact: {}
|
|
|
paths:
|
|
|
/api/device/v1/create:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 新建设备,UDID唯一
|
|
|
parameters:
|
|
|
- description: 项目
|
|
|
in: formData
|
|
|
name: project
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 产品
|
|
|
in: formData
|
|
|
name: product_name
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 存放设备名字型号
|
|
|
in: formData
|
|
|
name: device_name
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 操作系统的版本
|
|
|
in: formData
|
|
|
name: os
|
|
|
type: string
|
|
|
- description: 设备唯一udid
|
|
|
in: formData
|
|
|
name: udid
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 操作系统平台adr/ios
|
|
|
in: formData
|
|
|
name: platform
|
|
|
required: true
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回创建后的设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 新建设备
|
|
|
tags:
|
|
|
- 设备相关 /api/device/v1/
|
|
|
/api/device/v1/delete/{id}:
|
|
|
delete:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 根据主键软删除设备,is_del设为1
|
|
|
parameters:
|
|
|
- description: 设备id,必传
|
|
|
in: path
|
|
|
name: id
|
|
|
required: true
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回创建后的设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 删除设备
|
|
|
tags:
|
|
|
- 设备相关 /api/device/v1/
|
|
|
/api/device/v1/get_device:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 根据udid查询设备
|
|
|
parameters:
|
|
|
- description: 设备udid
|
|
|
in: query
|
|
|
name: udid
|
|
|
required: true
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 查询设备
|
|
|
tags:
|
|
|
- 设备相关 /api/device/v1/
|
|
|
/api/device/v1/list:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取设备列表
|
|
|
parameters:
|
|
|
- description: 每页大小,默认为10
|
|
|
in: query
|
|
|
name: page_size
|
|
|
type: integer
|
|
|
- description: 第几页,默认为第一页
|
|
|
in: query
|
|
|
name: page_index
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回设备列表信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取设备列表
|
|
|
tags:
|
|
|
- 设备相关 /api/device/v1/
|
|
|
/api/device/v1/update:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 根据主键更新设备
|
|
|
parameters:
|
|
|
- description: 设备id,必传
|
|
|
in: formData
|
|
|
name: id
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 项目
|
|
|
in: formData
|
|
|
name: project
|
|
|
type: string
|
|
|
- description: 产品
|
|
|
in: formData
|
|
|
name: product_name
|
|
|
type: string
|
|
|
- description: 存放设备名字型号
|
|
|
in: formData
|
|
|
name: device_name
|
|
|
type: string
|
|
|
- description: 操作系统的版本
|
|
|
in: formData
|
|
|
name: os
|
|
|
type: string
|
|
|
- description: 设备唯一udid
|
|
|
in: formData
|
|
|
name: udid
|
|
|
type: string
|
|
|
- description: 操作系统平台adr/ios
|
|
|
in: formData
|
|
|
name: platform
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回创建后的设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 更新设备
|
|
|
tags:
|
|
|
- 设备相关 /api/device/v1/
|
|
|
/api/monkey/v1/create_task:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 新建Monkey任务,创建成功后将会发送指令到monkey服务,初始status为WAITTING-等待中
|
|
|
parameters:
|
|
|
- description: 项目名
|
|
|
in: formData
|
|
|
name: project
|
|
|
type: string
|
|
|
- description: 测试包下载链接
|
|
|
in: formData
|
|
|
name: package_url
|
|
|
type: string
|
|
|
- description: 应用包名
|
|
|
in: formData
|
|
|
name: package_name
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 启动activity页
|
|
|
in: formData
|
|
|
name: launch_activity
|
|
|
type: string
|
|
|
- description: 平台adr/ios
|
|
|
in: formData
|
|
|
name: platform
|
|
|
required: true
|
|
|
type: string
|
|
|
- description: 运行时间(s),默认两小时(7200s)
|
|
|
in: formData
|
|
|
name: run_time
|
|
|
type: string
|
|
|
- description: 任务创建者
|
|
|
in: formData
|
|
|
name: creator
|
|
|
type: string
|
|
|
- description: 调用服务的方式,0-cli模式/1-api模式,默认cli
|
|
|
in: formData
|
|
|
name: mode
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回创建的任务id
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 新建Monkey任务
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/devices:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取安卓设备列表
|
|
|
parameters:
|
|
|
- description: 平台:ios/adr
|
|
|
in: query
|
|
|
name: platform
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取设备列表
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 根据id获取monkey任务信息
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: query
|
|
|
name: id
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回monkey任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取monkey任务信息
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/activity:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 通过monkey任务id获取覆盖的活动页面
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: query
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回任务覆盖的活动页
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取覆盖页面列表
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: Android上报activity名
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 设备id
|
|
|
in: formData
|
|
|
name: device_name
|
|
|
type: string
|
|
|
- description: 页面名称
|
|
|
in: formData
|
|
|
name: activity_name
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回更新后的任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 上报Monkey应用页
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/crash_count:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 更新Monkey任务崩溃数量
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 要更新的崩溃数量
|
|
|
in: formData
|
|
|
name: crash_count
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回更新后的任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 更新Monkey任务崩溃数量
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/devices:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取安卓设备列表
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: query
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回设备信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取设备列表
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/pid:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 上传进程id并关联到任务
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 进程id
|
|
|
in: formData
|
|
|
name: pid
|
|
|
required: true
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回成功或失败
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 上报进程id
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/result:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 通过任务id获取Monkey结果
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: query
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回任务结果
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取Monkey结果
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 上报Monkey结果
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 要更新的任务状态
|
|
|
in: formData
|
|
|
name: crash_log_list
|
|
|
type: string
|
|
|
- description: 要更新的任务状态
|
|
|
in: formData
|
|
|
name: activity_name_info
|
|
|
type: string
|
|
|
- description: 要更新的任务状态
|
|
|
in: formData
|
|
|
name: device_name
|
|
|
type: string
|
|
|
- description: 要更新的任务状态
|
|
|
in: formData
|
|
|
name: status
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回更新后的任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 上报Monkey结果
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/status:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 更新Monkey任务状态,进行中为RUNNING,已完成为FINIASHED,如有错误为ERROR
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 要更新的任务状态
|
|
|
in: formData
|
|
|
name: status
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回更新后的任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 更新Monkey任务状态
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/stop:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 停止monkey任务,杀死所有关联任务的进程id
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回成功或失败
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 停止monkey任务
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/task/update_devices:
|
|
|
post:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 上报运行设备Udid,调用后追加到指定任务的设备字段中
|
|
|
parameters:
|
|
|
- description: 任务id
|
|
|
in: formData
|
|
|
name: task_id
|
|
|
required: true
|
|
|
type: integer
|
|
|
- description: 设备udid
|
|
|
in: formData
|
|
|
name: udid
|
|
|
required: true
|
|
|
type: string
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回成功或失败
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 上报运行设备
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/api/monkey/v1/tasks:
|
|
|
get:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 获取任务列表
|
|
|
parameters:
|
|
|
- description: 每页大小,默认为10
|
|
|
in: query
|
|
|
name: page_size
|
|
|
type: integer
|
|
|
- description: 第几页,默认为第一页
|
|
|
in: query
|
|
|
name: page_index
|
|
|
type: integer
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回更新后的任务信息
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 获取任务列表
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
/webdav/monkey/task/:id/:filename:
|
|
|
put:
|
|
|
consumes:
|
|
|
- application/x-www-form-urlencoded
|
|
|
description: 上传Logcat日志
|
|
|
responses:
|
|
|
"200":
|
|
|
description: 返回成功或失败
|
|
|
schema:
|
|
|
$ref: '#/definitions/models.Response'
|
|
|
summary: 上传Logcat日志
|
|
|
tags:
|
|
|
- Monkey相关 /api/monkey/v1/
|
|
|
swagger: "2.0"
|