|
@@ -13,8 +13,8 @@ import cn.seecoder.web.service.APITest.APITestService;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @Author zxr
|
|
|
|
|
- * @Description 接口测试相关操作
|
|
|
|
|
|
|
+ * @author zxr
|
|
|
|
|
+ * @description: 接口测试相关操作
|
|
|
*/
|
|
*/
|
|
|
@Api(tags = "接口测试 API")
|
|
@Api(tags = "接口测试 API")
|
|
|
@RestController
|
|
@RestController
|
|
@@ -30,7 +30,7 @@ public class APITestController {
|
|
|
|
|
|
|
|
@PostMapping("/create")
|
|
@PostMapping("/create")
|
|
|
@ApiOperation(value = "创建一个新的测试任务", httpMethod = "POST")
|
|
@ApiOperation(value = "创建一个新的测试任务", httpMethod = "POST")
|
|
|
- public Response createAPITestMission(@RequestBody APITestBodyVO apiTestBodyVO) {
|
|
|
|
|
|
|
+ public Response<Object> createAPITestMission(@RequestBody APITestBodyVO apiTestBodyVO) {
|
|
|
apiTestService.createAPITest(apiTestBodyVO);
|
|
apiTestService.createAPITest(apiTestBodyVO);
|
|
|
return Response.buildSuccess();
|
|
return Response.buildSuccess();
|
|
|
}
|
|
}
|
|
@@ -45,7 +45,7 @@ public class APITestController {
|
|
|
@GetMapping("/delete/{testId}")
|
|
@GetMapping("/delete/{testId}")
|
|
|
@ApiOperation(value = "删除指定测试任务", httpMethod = "DELETE")
|
|
@ApiOperation(value = "删除指定测试任务", httpMethod = "DELETE")
|
|
|
@ApiImplicitParam(name = "testId", dataType = "int", paramType = "query")
|
|
@ApiImplicitParam(name = "testId", dataType = "int", paramType = "query")
|
|
|
- public Response deleteAPITestInfoByTestId(@PathVariable("testId") Integer testId) {
|
|
|
|
|
|
|
+ public Response<Object> deleteAPITestInfoByTestId(@PathVariable("testId") Integer testId) {
|
|
|
apiTestService.deleteAPITest(testId);
|
|
apiTestService.deleteAPITest(testId);
|
|
|
return Response.buildSuccess();
|
|
return Response.buildSuccess();
|
|
|
}
|
|
}
|
|
@@ -53,7 +53,7 @@ public class APITestController {
|
|
|
@GetMapping("/execute/{testId}")
|
|
@GetMapping("/execute/{testId}")
|
|
|
@ApiOperation(value = "执行制定测试任务", httpMethod = "GET")
|
|
@ApiOperation(value = "执行制定测试任务", httpMethod = "GET")
|
|
|
@ApiImplicitParam(name = "testID", dataType = "int", paramType = "query")
|
|
@ApiImplicitParam(name = "testID", dataType = "int", paramType = "query")
|
|
|
- public Response executeAPITestByTestId(@PathVariable("testId") Integer testId) throws InterruptedException {
|
|
|
|
|
|
|
+ public Response<Object> executeAPITestByTestId(@PathVariable("testId") Integer testId) throws InterruptedException {
|
|
|
apiTestService.executeAPITest(testId);
|
|
apiTestService.executeAPITest(testId);
|
|
|
return Response.buildSuccess();
|
|
return Response.buildSuccess();
|
|
|
}
|
|
}
|