Merge remote-tracking branch 'origin/v1.8' into v1.8
This commit is contained in:
commit
d72a3e049b
|
@ -89,7 +89,6 @@ public class MsScenario extends MsTestElement {
|
||||||
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
||||||
hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
||||||
});
|
});
|
||||||
OldVersionUtil.transferHashTree(hashTree);
|
|
||||||
// 场景变量
|
// 场景变量
|
||||||
if (StringUtils.isNotEmpty(element.getString("variables"))) {
|
if (StringUtils.isNotEmpty(element.getString("variables"))) {
|
||||||
LinkedList<ScenarioVariable> variables = mapper.readValue(element.getString("variables"),
|
LinkedList<ScenarioVariable> variables = mapper.readValue(element.getString("variables"),
|
||||||
|
|
|
@ -163,7 +163,6 @@ public abstract class MsTestElement {
|
||||||
element = mapper.readValue(apiDefinition.getRequest(), new TypeReference<MsTestElement>() {
|
element = mapper.readValue(apiDefinition.getRequest(), new TypeReference<MsTestElement>() {
|
||||||
});
|
});
|
||||||
hashTree.add(element);
|
hashTree.add(element);
|
||||||
OldVersionUtil.transferHashTree(hashTree);
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|
|
@ -242,7 +242,7 @@ public class ApiAutomationService {
|
||||||
} else {
|
} else {
|
||||||
scenario.setUserId(request.getUserId());
|
scenario.setUserId(request.getUserId());
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || StringUtils.isEmpty(request.getModulePath())) {
|
if (StringUtils.isEmpty(request.getApiScenarioModuleId())) {
|
||||||
scenario.setApiScenarioModuleId("root");
|
scenario.setApiScenarioModuleId("root");
|
||||||
scenario.setModulePath("/默认模块");
|
scenario.setModulePath("/默认模块");
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,7 +262,7 @@ public class ApiDefinitionService {
|
||||||
test.setEnvironmentId(request.getEnvironmentId());
|
test.setEnvironmentId(request.getEnvironmentId());
|
||||||
test.setUserId(request.getUserId());
|
test.setUserId(request.getUserId());
|
||||||
test.setTags(request.getTags());
|
test.setTags(request.getTags());
|
||||||
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModuleId())) {
|
||||||
test.setModulePath("/默认模块");
|
test.setModulePath("/默认模块");
|
||||||
test.setModuleId("root");
|
test.setModuleId("root");
|
||||||
}
|
}
|
||||||
|
@ -290,7 +290,7 @@ public class ApiDefinitionService {
|
||||||
test.setStatus(APITestStatus.Underway.name());
|
test.setStatus(APITestStatus.Underway.name());
|
||||||
test.setModulePath(request.getModulePath());
|
test.setModulePath(request.getModulePath());
|
||||||
test.setModuleId(request.getModuleId());
|
test.setModuleId(request.getModuleId());
|
||||||
if (StringUtils.isEmpty(request.getModulePath()) || StringUtils.isEmpty(request.getModuleId())) {
|
if (StringUtils.isEmpty(request.getModuleId())) {
|
||||||
test.setModulePath("/默认模块");
|
test.setModulePath("/默认模块");
|
||||||
test.setModuleId("root");
|
test.setModuleId("root");
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ public class ApiDefinitionService {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
ApiDefinitionWithBLOBs item = data.get(i);
|
ApiDefinitionWithBLOBs item = data.get(i);
|
||||||
if (StringUtils.isEmpty(item.getModuleId()) || StringUtils.isEmpty(item.getModulePath())) {
|
if (StringUtils.isEmpty(item.getModuleId())) {
|
||||||
item.setModuleId("root");
|
item.setModuleId("root");
|
||||||
item.setModulePath("/默认模块");
|
item.setModulePath("/默认模块");
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,11 +82,6 @@ public class HistoricalDataUpgradeService {
|
||||||
scenario.setName(oldScenario.getName());
|
scenario.setName(oldScenario.getName());
|
||||||
scenario.setEnableCookieShare(oldScenario.isEnableCookieShare());
|
scenario.setEnableCookieShare(oldScenario.isEnableCookieShare());
|
||||||
scenario.setEnvironmentId(oldScenario.getEnvironmentId());
|
scenario.setEnvironmentId(oldScenario.getEnvironmentId());
|
||||||
if (StringUtils.isNotEmpty(oldScenario.getEnvironmentId())) {
|
|
||||||
HashMap<String, String> envMap = new HashMap<>();
|
|
||||||
envMap.put(projectId, oldScenario.getEnvironmentId());
|
|
||||||
scenario.setEnvironmentMap(envMap);
|
|
||||||
}
|
|
||||||
scenario.setReferenced("Upgrade");
|
scenario.setReferenced("Upgrade");
|
||||||
scenario.setId(oldScenario.getId());
|
scenario.setId(oldScenario.getId());
|
||||||
scenario.setResourceId(UUID.randomUUID().toString());
|
scenario.setResourceId(UUID.randomUUID().toString());
|
||||||
|
@ -431,9 +426,6 @@ public class HistoricalDataUpgradeService {
|
||||||
num++;
|
num++;
|
||||||
scenarioTest.setHashTree(listSteps);
|
scenarioTest.setHashTree(listSteps);
|
||||||
if (StringUtils.isNotEmpty(envId)) {
|
if (StringUtils.isNotEmpty(envId)) {
|
||||||
HashMap<String, String> envMap = new HashMap<>();
|
|
||||||
envMap.put(saveHistoricalDataUpgrade.getProjectId(), envId);
|
|
||||||
scenarioTest.setEnvironmentMap(envMap);
|
|
||||||
scenarioTest.setEnvironmentId(envId);
|
scenarioTest.setEnvironmentId(envId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue