Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e44311c2a8
|
@ -91,8 +91,8 @@ public class APITestController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/run/debug", consumes = {"multipart/form-data"})
|
@PostMapping(value = "/run/debug", consumes = {"multipart/form-data"})
|
||||||
public String runDebug(@RequestPart("request") SaveAPITestRequest request, @RequestPart(value = "file") MultipartFile file) {
|
public String runDebug(@RequestPart("request") SaveAPITestRequest request, @RequestPart(value = "file") MultipartFile file, @RequestPart(value = "files") List<MultipartFile> bodyFiles) {
|
||||||
return apiTestService.runDebug(request, file);
|
return apiTestService.runDebug(request, file, bodyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/import", consumes = {"multipart/form-data"})
|
@PostMapping(value = "/import", consumes = {"multipart/form-data"})
|
||||||
|
|
|
@ -395,12 +395,15 @@ public class APITestService {
|
||||||
return schedules;
|
return schedules;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String runDebug(SaveAPITestRequest request, MultipartFile file) {
|
public String runDebug(SaveAPITestRequest request, MultipartFile file, List<MultipartFile> bodyFiles) {
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
throw new IllegalArgumentException(Translator.get("file_cannot_be_null"));
|
throw new IllegalArgumentException(Translator.get("file_cannot_be_null"));
|
||||||
}
|
}
|
||||||
updateTest(request);
|
updateTest(request);
|
||||||
APITestResult apiTest = get(request.getId());
|
APITestResult apiTest = get(request.getId());
|
||||||
|
List<String> bodyUploadIds = new ArrayList<>(request.getBodyUploadIds()) ;
|
||||||
|
request.setBodyUploadIds(null);
|
||||||
|
createBodyFiles(apiTest, bodyUploadIds, bodyFiles);
|
||||||
if (SessionUtils.getUser() == null) {
|
if (SessionUtils.getUser() == null) {
|
||||||
apiTest.setUserId(request.getUserId());
|
apiTest.setUserId(request.getUserId());
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,8 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="list" resultMap="BaseResultMap">
|
<select id="list" resultMap="BaseResultMap">
|
||||||
select api_test.*, project.name as project_name, user.name as user_name
|
select api_test.id, api_test.project_id, api_test.name, api_test.description,
|
||||||
|
api_test.status, api_test.user_id, api_test.create_time, api_test.update_time, project.name as project_name, user.name as user_name
|
||||||
from api_test
|
from api_test
|
||||||
left join project on api_test.project_id = project.id
|
left join project on api_test.project_id = project.id
|
||||||
left join user on api_test.user_id = user.id
|
left join user on api_test.user_id = user.id
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit ecb30d83c575c6ed14adb1a1ebea389730f410a9
|
Subproject commit b86032cbbda9a9e6028308aa95a887cff2192f1c
|
|
@ -88,10 +88,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let self = this;
|
||||||
ApiEvent.$on(LIST_CHANGE, () => {
|
ApiEvent.$on(LIST_CHANGE, () => {
|
||||||
this.$refs.projectRecent.recent();
|
self.$refs.projectRecent.recent();
|
||||||
this.$refs.testRecent.recent();
|
self.$refs.testRecent.recent();
|
||||||
this.$refs.reportRecent.recent();
|
self.$refs.reportRecent.recent();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,6 +303,7 @@ export default {
|
||||||
let url = "/api/run/debug";
|
let url = "/api/run/debug";
|
||||||
let runningTest = new Test();
|
let runningTest = new Test();
|
||||||
Object.assign(runningTest, this.test);
|
Object.assign(runningTest, this.test);
|
||||||
|
let bodyFiles = this.getBodyUploadFiles();
|
||||||
runningTest.scenarioDefinition = [];
|
runningTest.scenarioDefinition = [];
|
||||||
runningTest.scenarioDefinition.push(scenario);
|
runningTest.scenarioDefinition.push(scenario);
|
||||||
let validator = runningTest.isValid();
|
let validator = runningTest.isValid();
|
||||||
|
@ -314,8 +315,9 @@ export default {
|
||||||
let jmx = runningTest.toJMX();
|
let jmx = runningTest.toJMX();
|
||||||
let blob = new Blob([jmx.xml], {type: "application/octet-stream"});
|
let blob = new Blob([jmx.xml], {type: "application/octet-stream"});
|
||||||
let file = new File([blob], jmx.name);
|
let file = new File([blob], jmx.name);
|
||||||
this.$fileUpload(url, file, null, this.test, response => {
|
this.$fileUpload(url, file, bodyFiles, this.test, response => {
|
||||||
this.debugReportId = response.data;
|
this.debugReportId = response.data;
|
||||||
|
this.resetBodyFile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 390943d21e7d0196e0d7d5faa66f0131cb631614
|
Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d
|
Loading…
Reference in New Issue