This commit is contained in:
fit2-zhao 2021-03-08 13:30:18 +08:00
commit 9b6281d4cc
6 changed files with 15 additions and 8 deletions

View File

@ -415,6 +415,12 @@ public class ApiAutomationService {
String testPlanScenarioId = item.getId();
if (request.getScenarioTestPlanIdMap() != null && request.getScenarioTestPlanIdMap().containsKey(item.getId())) {
testPlanScenarioId = request.getScenarioTestPlanIdMap().get(item.getId());
// 获取场景用例单独的执行环境
TestPlanApiScenario planApiScenario = testPlanApiScenarioMapper.selectByPrimaryKey(testPlanScenarioId);
String environment = planApiScenario.getEnvironment();
if (StringUtils.isNotBlank(environment)) {
scenario.setEnvironmentMap(JSON.parseObject(environment, Map.class));
}
}
createScenarioReport(group.getName(), testPlanScenarioId, item.getName(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode(),
request.getExecuteType(), item.getProjectId(), request.getReportUserID());

View File

@ -1,6 +1,5 @@
package io.metersphere.service;
import com.sun.corba.se.spi.orbutil.threadpool.Work;
import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.ProjectMapper;
import io.metersphere.base.mapper.UserMapper;

View File

@ -27,10 +27,6 @@ CREATE TABLE IF NOT EXISTS `api_document_share` (
INDEX `share_api_id`(`share_api_id`(125)) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- test_case_review add coloumn
ALTER TABLE test_case_review
ADD tags VARCHAR(2000) NULL;
-- swagger_url_project
alter table swagger_url_project
modify module_id varchar(120) null;

View File

@ -127,7 +127,7 @@ export default {
this.$set(this.test, "name", apiTest.name);
let blob = new Blob([apiTest.jmx.xml], {type: "application/octet-stream"});
let file = new File([blob], apiTest.jmx.name);
this.$refs.basicConfig.beforeUpload(file);
this.$refs.basicConfig.beforeUploadJmx(file);
this.$refs.basicConfig.handleUpload({file: file});
this.active = '1';
this.$store.commit("clearTest");

View File

@ -121,7 +121,13 @@ export default {
if (this.loadType === 'resource') {
rows.forEach(row => {
this.tableData.push(row);
this.fileList.push(row);
this.tableData.push({
name: row.name,
size: (row.size / 1024).toFixed(2) + ' KB',
type: 'JMX',
updateTime: row.lastModified,
});
})
this.$success(this.$t('test_track.case.import.success'));
this.loadFileVisible = false;

@ -1 +1 @@
Subproject commit ef5067d0de3ed940a5d31485f6370f201818dc3a
Subproject commit e4422e1dc640704febfbf469185cd85b78d2147a