import request from '@/utils/request'
//上传测试任务
export function uploadTask(task) {
  return request({
    url: '/task',
    method: 'post',
    data: task
  })
}

//查询任务列表
export function listTask(params) {
  return request({
    url: '/task',
    method: 'get',
    params: params
  })
}

//查询任务进度
export function queryProcess(taskId) {
  return request({
    url: '/task/process/'+taskId,
    method: 'get'
  })
}
//查询测试结果
export function queryResult(taskId) {
  return request({
    url: '/task/result/'+taskId,
    method: 'get'
  })
}
//获取任务详情
export function queryTask(taskId) {
  return request({
    url: '/task/'+taskId,
    method: 'get'
  })
}

