refactor(接口测试): 部分拼写错误单词修改
This commit is contained in:
parent
f51f53eed9
commit
dbaa3297f0
|
@ -322,8 +322,8 @@ public class MsTCPSampler extends MsTestElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatMockValue(String value) {
|
private String formatMockValue(String value) {
|
||||||
String patten = ">@[^>@]+</?";
|
String pattern = ">@[^>@]+</?";
|
||||||
Pattern r = Pattern.compile(patten);
|
Pattern r = Pattern.compile(pattern);
|
||||||
try {
|
try {
|
||||||
Matcher m = r.matcher(value);
|
Matcher m = r.matcher(value);
|
||||||
while (m.find()) {
|
while (m.find()) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ResourcePoolCalculation {
|
||||||
NodeDTO node = JSON.parseObject(configuration, NodeDTO.class);
|
NodeDTO node = JSON.parseObject(configuration, NodeDTO.class);
|
||||||
String nodeIp = node.getIp();
|
String nodeIp = node.getIp();
|
||||||
Integer port = node.getPort();
|
Integer port = node.getPort();
|
||||||
String uri = String.format(BASE_URL + "/jmeter/getJvmInfo", nodeIp, port);
|
String uri = String.format(BASE_URL + "/jmeter/get-jvm-info", nodeIp, port);
|
||||||
JvmInfoDTO nodeJvm = this.getNodeJvmInfo(uri);
|
JvmInfoDTO nodeJvm = this.getNodeJvmInfo(uri);
|
||||||
if (nodeJvm == null) {
|
if (nodeJvm == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -30,7 +30,7 @@ public interface ExtApiScenarioMapper {
|
||||||
|
|
||||||
int selectTrash(@Param("projectId") String projectId);
|
int selectTrash(@Param("projectId") String projectId);
|
||||||
|
|
||||||
List<ApiScenarioWithBLOBs> selectByIds(@Param("ids") String ids, @Param("oderId") String oderId);
|
List<ApiScenarioWithBLOBs> selectByIds(@Param("ids") String ids, @Param("order") String order);
|
||||||
|
|
||||||
List<ApiScenario> selectReference(@Param("request") ApiScenarioRequest request);
|
List<ApiScenario> selectReference(@Param("request") ApiScenarioRequest request);
|
||||||
|
|
||||||
|
|
|
@ -442,7 +442,7 @@
|
||||||
select *
|
select *
|
||||||
from api_scenario
|
from api_scenario
|
||||||
where id in (${ids})
|
where id in (${ids})
|
||||||
ORDER BY FIND_IN_SET(id, ${oderId})
|
ORDER BY FIND_IN_SET(id, ${order})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectReference" resultType="io.metersphere.base.domain.ApiScenario">
|
<select id="selectReference" resultType="io.metersphere.base.domain.ApiScenario">
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ExtApiScenarioReportDetailMapper {
|
public interface ExtApiScenarioReportDetailMapper {
|
||||||
List<ApiScenarioReportDetail> selectByIds(@Param("ids") String ids, @Param("oderId") String oderId);
|
List<ApiScenarioReportDetail> selectByIds(@Param("ids") String ids, @Param("order") String order);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
where ad.report_id in (select ar.id from api_scenario_report ar where ar.project_id = #{projectId,jdbcType=VARCHAR} )
|
where ad.report_id in (select ar.id from api_scenario_report ar where ar.project_id = #{projectId,jdbcType=VARCHAR} )
|
||||||
</delete>
|
</delete>
|
||||||
<select id="selectByIds" resultType="io.metersphere.base.domain.ApiScenarioReportDetail">
|
<select id="selectByIds" resultType="io.metersphere.base.domain.ApiScenarioReportDetail">
|
||||||
select t.* from api_scenario_report_detail t where t.report_id in (${ids}) ORDER BY FIND_IN_SET(t.report_id,${oderId})
|
select t.* from api_scenario_report_detail t where t.report_id in (${ids}) ORDER BY FIND_IN_SET(t.report_id,${order})
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -25,7 +25,7 @@ public interface ExtTestPlanScenarioCaseMapper {
|
||||||
|
|
||||||
List<String> selectIds(@Param("request")TestPlanScenarioRequest request);
|
List<String> selectIds(@Param("request")TestPlanScenarioRequest request);
|
||||||
|
|
||||||
List<TestPlanApiScenario> selectByIds(@Param("ids")String ids ,@Param("oderId")String oderId );
|
List<TestPlanApiScenario> selectByIds(@Param("ids")String ids ,@Param("order")String order );
|
||||||
|
|
||||||
List<TestPlanApiScenarioInfoDTO> selectLegalDataByTestPlanId(String planId);
|
List<TestPlanApiScenarioInfoDTO> selectLegalDataByTestPlanId(String planId);
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
select t.*
|
select t.*
|
||||||
from test_plan_api_scenario t
|
from test_plan_api_scenario t
|
||||||
where t.id in (${ids})
|
where t.id in (${ids})
|
||||||
ORDER BY FIND_IN_SET(t.id, ${oderId})
|
ORDER BY FIND_IN_SET(t.id, ${order})
|
||||||
</select>
|
</select>
|
||||||
<select id="selectIds" resultType="java.lang.String">
|
<select id="selectIds" resultType="java.lang.String">
|
||||||
select
|
select
|
||||||
|
|
|
@ -1880,7 +1880,7 @@ export default {
|
||||||
apiImport(importData) {
|
apiImport(importData) {
|
||||||
if (importData && importData.data) {
|
if (importData && importData.data) {
|
||||||
importData.data.forEach(item => {
|
importData.data.forEach(item => {
|
||||||
this.setApiParameter(item, "API", "OT_IMPORT");
|
this.setApiParameter(item, "API", "TO_IMPORT");
|
||||||
})
|
})
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
|
|
|
@ -20,7 +20,7 @@ export function STEP() {
|
||||||
['DubboSampler', getDefaultSamplerMenu()],
|
['DubboSampler', getDefaultSamplerMenu()],
|
||||||
['JDBCSampler', getDefaultSamplerMenu()],
|
['JDBCSampler', getDefaultSamplerMenu()],
|
||||||
['TCPSampler', getDefaultSamplerMenu()],
|
['TCPSampler', getDefaultSamplerMenu()],
|
||||||
['OT_IMPORT', getDefaultSamplerMenu()],
|
['TO_IMPORT', getDefaultSamplerMenu()],
|
||||||
['AbstractSampler', getDefaultSamplerMenu()],
|
['AbstractSampler', getDefaultSamplerMenu()],
|
||||||
['IfController', getAll()],
|
['IfController', getAll()],
|
||||||
['TransactionController', getAll()],
|
['TransactionController', getAll()],
|
||||||
|
@ -48,7 +48,7 @@ export function STEP() {
|
||||||
export const ELEMENT_TYPE = {
|
export const ELEMENT_TYPE = {
|
||||||
scenario: 'scenario',
|
scenario: 'scenario',
|
||||||
HTTPSamplerProxy: 'HTTPSamplerProxy',
|
HTTPSamplerProxy: 'HTTPSamplerProxy',
|
||||||
OT_IMPORT: 'OT_IMPORT',
|
TO_IMPORT: 'TO_IMPORT',
|
||||||
IfController: 'IfController',
|
IfController: 'IfController',
|
||||||
TransactionController: 'TransactionController',
|
TransactionController: 'TransactionController',
|
||||||
ConstantTimer: 'ConstantTimer',
|
ConstantTimer: 'ConstantTimer',
|
||||||
|
|
|
@ -339,7 +339,7 @@ export default {
|
||||||
return (this.request.referenced && verifies.indexOf(this.request.referenced) !== -1);
|
return (this.request.referenced && verifies.indexOf(this.request.referenced) !== -1);
|
||||||
},
|
},
|
||||||
isExternalImport() {
|
isExternalImport() {
|
||||||
return (this.request.referenced && this.request.referenced === 'OT_IMPORT');
|
return (this.request.referenced && this.request.referenced === 'TO_IMPORT');
|
||||||
},
|
},
|
||||||
isCustomizeReq() {
|
isCustomizeReq() {
|
||||||
return (!this.request.referenced || this.request.referenced === 'Created');
|
return (!this.request.referenced || this.request.referenced === 'Created');
|
||||||
|
@ -712,12 +712,6 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.ms-api-col-ot-import-button {
|
|
||||||
background-color: #EEF5FE;
|
|
||||||
margin-right: 20px;
|
|
||||||
color: #409EFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon.is-active {
|
.icon.is-active {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ export default {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
isExternalImport() {
|
isExternalImport() {
|
||||||
if (this.request.referenced && this.request.referenced === 'OT_IMPORT') {
|
if (this.request.referenced && this.request.referenced === 'TO_IMPORT') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -899,7 +899,7 @@ export default {
|
||||||
apiImport(importData) {
|
apiImport(importData) {
|
||||||
if (importData && importData.data) {
|
if (importData && importData.data) {
|
||||||
importData.data.forEach(item => {
|
importData.data.forEach(item => {
|
||||||
this.setApiParameter(item, "API", "OT_IMPORT");
|
this.setApiParameter(item, "API", "TO_IMPORT");
|
||||||
})
|
})
|
||||||
this.sort();
|
this.sort();
|
||||||
this.reload();
|
this.reload();
|
||||||
|
|
|
@ -22,11 +22,11 @@ export class Environment extends BaseConfig {
|
||||||
export class SSLConfig extends BaseConfig {
|
export class SSLConfig extends BaseConfig {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
super();
|
super();
|
||||||
this.entrys = [];
|
this.entry = [];
|
||||||
this.files = [];
|
this.files = [];
|
||||||
this.set(options);
|
this.set(options);
|
||||||
this.sets({files: KeyValue}, options);
|
this.sets({files: KeyValue}, options);
|
||||||
this.sets({entrys: KeyValue}, options);
|
this.sets({entry: KeyValue}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
initOptions(options = {}) {
|
initOptions(options = {}) {
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
|
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
{{ $t('api_test.home_page.detail_card.rate.case_pase') + ":" }}
|
{{ $t('home.table.case_pass') + ":" }}
|
||||||
</span>
|
</span>
|
||||||
<span class="rows-count-number" style="font-size: 14px">
|
<span class="rows-count-number" style="font-size: 14px">
|
||||||
<b>
|
<b>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
|
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
{{ $t('api_test.home_page.detail_card.rate.scenario_pase') + ":" }}
|
{{ $t('home.table.scenario_pass') + ":" }}
|
||||||
</span>
|
</span>
|
||||||
<span class="rows-count-number" style="font-size: 14px">
|
<span class="rows-count-number" style="font-size: 14px">
|
||||||
<b>
|
<b>
|
||||||
|
|
|
@ -29,6 +29,8 @@ const message = {
|
||||||
next_execution_time: "Next Execution Time",
|
next_execution_time: "Next Execution Time",
|
||||||
create_user: "Creator",
|
create_user: "Creator",
|
||||||
update_time: "Update time",
|
update_time: "Update time",
|
||||||
|
case_pass: "Case pass rate",
|
||||||
|
scenario_pass: "Scenario pass rate",
|
||||||
},
|
},
|
||||||
case: {
|
case: {
|
||||||
index: "Ranking",
|
index: "Ranking",
|
||||||
|
|
|
@ -29,6 +29,8 @@ const message = {
|
||||||
next_execution_time: "下次执行时间",
|
next_execution_time: "下次执行时间",
|
||||||
create_user: "创建人",
|
create_user: "创建人",
|
||||||
update_time: "更新时间",
|
update_time: "更新时间",
|
||||||
|
case_pass: "用例通过率",
|
||||||
|
scenario_pass: "场景通过率",
|
||||||
},
|
},
|
||||||
case: {
|
case: {
|
||||||
index: "排名",
|
index: "排名",
|
||||||
|
|
|
@ -29,6 +29,8 @@ const message = {
|
||||||
next_execution_time: "下次執行時間",
|
next_execution_time: "下次執行時間",
|
||||||
create_user: "創建人",
|
create_user: "創建人",
|
||||||
update_time: "更新時間",
|
update_time: "更新時間",
|
||||||
|
case_pass: "用例通過率",
|
||||||
|
scenario_pass: "場景通過率",
|
||||||
},
|
},
|
||||||
case: {
|
case: {
|
||||||
index: "排名",
|
index: "排名",
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
<p class="tip">{{ this.$t('commons.ssl.entry') }} </p>
|
<p class="tip">{{ this.$t('commons.ssl.entry') }} </p>
|
||||||
<div class="ms-border">
|
<div class="ms-border">
|
||||||
<el-table :data="sslConfig.entrys" highlight-current-row v-if="!loading">
|
<el-table :data="sslConfig.entry" highlight-current-row v-if="!loading">
|
||||||
<el-table-column prop="originalAsName" :label="$t('commons.ssl.original_as_name')" show-overflow-tooltip
|
<el-table-column prop="originalAsName" :label="$t('commons.ssl.original_as_name')" show-overflow-tooltip
|
||||||
width="180"/>
|
width="180"/>
|
||||||
<el-table-column prop="newAsName" :label="$t('commons.ssl.new_as_name')" show-overflow-tooltip
|
<el-table-column prop="newAsName" :label="$t('commons.ssl.new_as_name')" show-overflow-tooltip
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
||||||
item.password = "";
|
item.password = "";
|
||||||
item.default = false;
|
item.default = false;
|
||||||
|
|
||||||
this.sslConfig.entrys.unshift(item);
|
this.sslConfig.entry.unshift(item);
|
||||||
})
|
})
|
||||||
this.sslConfig.files.unshift(sslFile);
|
this.sslConfig.files.unshift(sslFile);
|
||||||
} else {
|
} else {
|
||||||
|
@ -159,7 +159,7 @@ export default {
|
||||||
}
|
}
|
||||||
item.password = "";
|
item.password = "";
|
||||||
item.default = false;
|
item.default = false;
|
||||||
this.sslConfig.entrys.unshift(item);
|
this.sslConfig.entry.unshift(item);
|
||||||
})
|
})
|
||||||
this.sslConfig.files.unshift(sslFile);
|
this.sslConfig.files.unshift(sslFile);
|
||||||
}
|
}
|
||||||
|
@ -170,24 +170,24 @@ export default {
|
||||||
const index = this.sslConfig.files.findIndex((d) => d.id === row.id);
|
const index = this.sslConfig.files.findIndex((d) => d.id === row.id);
|
||||||
this.sslConfig.files.splice(index, 1);
|
this.sslConfig.files.splice(index, 1);
|
||||||
// 同时删除条目
|
// 同时删除条目
|
||||||
if (this.sslConfig.entrys) {
|
if (this.sslConfig.entry) {
|
||||||
let removeKeys = [];
|
let removeKeys = [];
|
||||||
this.sslConfig.entrys.forEach(item => {
|
this.sslConfig.entry.forEach(item => {
|
||||||
if (item && item.sourceId === row.id) {
|
if (item && item.sourceId === row.id) {
|
||||||
const index = this.sslConfig.entrys.findIndex((d) => d.sourceId === row.id);
|
const index = this.sslConfig.entry.findIndex((d) => d.sourceId === row.id);
|
||||||
removeKeys.push(index);
|
removeKeys.push(index);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
removeKeys.forEach(index => {
|
removeKeys.forEach(index => {
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.sslConfig.entrys.splice(index, 1);
|
this.sslConfig.entry.splice(index, 1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeCheck(row) {
|
changeCheck(row) {
|
||||||
if (row.default) {
|
if (row.default) {
|
||||||
this.sslConfig.entrys.forEach(item => {
|
this.sslConfig.entry.forEach(item => {
|
||||||
if (item && item.sourceId !== row.id) {
|
if (item && item.sourceId !== row.id) {
|
||||||
item.default = false;
|
item.default = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,11 @@ export class Environment extends BaseConfig {
|
||||||
export class SSLConfig extends BaseConfig {
|
export class SSLConfig extends BaseConfig {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
super();
|
super();
|
||||||
this.entrys = [];
|
this.entry = [];
|
||||||
this.files = [];
|
this.files = [];
|
||||||
this.set(options);
|
this.set(options);
|
||||||
this.sets({files: KeyValue}, options);
|
this.sets({files: KeyValue}, options);
|
||||||
this.sets({entrys: KeyValue}, options);
|
this.sets({entry: KeyValue}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
initOptions(options = {}) {
|
initOptions(options = {}) {
|
||||||
|
|
|
@ -101,8 +101,8 @@ public class CommandService {
|
||||||
this.createKeyStore("ms-run", newKeyStore);
|
this.createKeyStore("ms-run", newKeyStore);
|
||||||
// 修改别名
|
// 修改别名
|
||||||
Map<String, List<KeyStoreEntry>> entryMap = new HashMap<>();
|
Map<String, List<KeyStoreEntry>> entryMap = new HashMap<>();
|
||||||
if (sslConfig != null && CollectionUtils.isNotEmpty(sslConfig.getEntrys())) {
|
if (sslConfig != null && CollectionUtils.isNotEmpty(sslConfig.getEntry())) {
|
||||||
sslConfig.getEntrys().forEach(item -> {
|
sslConfig.getEntry().forEach(item -> {
|
||||||
if (entryMap.containsKey(item.getSourceId())) {
|
if (entryMap.containsKey(item.getSourceId())) {
|
||||||
entryMap.get(item.getSourceId()).add(item);
|
entryMap.get(item.getSourceId()).add(item);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -9,12 +9,12 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class KeyStoreConfig {
|
public class KeyStoreConfig {
|
||||||
private List<KeyStoreEntry> entrys;
|
private List<KeyStoreEntry> entry;
|
||||||
private List<KeyStoreFile> files;
|
private List<KeyStoreFile> files;
|
||||||
|
|
||||||
public String getDefaultAlias() {
|
public String getDefaultAlias() {
|
||||||
if (CollectionUtils.isNotEmpty(entrys)) {
|
if (CollectionUtils.isNotEmpty(entry)) {
|
||||||
List<KeyStoreEntry> entryList = this.entrys.stream().filter(KeyStoreEntry::isDefault).collect(Collectors.toList());
|
List<KeyStoreEntry> entryList = this.entry.stream().filter(KeyStoreEntry::isDefault).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(entryList)) {
|
if (CollectionUtils.isNotEmpty(entryList)) {
|
||||||
if (StringUtils.isNotEmpty(entryList.get(0).getNewAsName())) {
|
if (StringUtils.isNotEmpty(entryList.get(0).getNewAsName())) {
|
||||||
return entryList.get(0).getNewAsName();
|
return entryList.get(0).getNewAsName();
|
||||||
|
@ -27,8 +27,8 @@ public class KeyStoreConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAlias(String asName) {
|
public String getAlias(String asName) {
|
||||||
if (CollectionUtils.isNotEmpty(entrys)) {
|
if (CollectionUtils.isNotEmpty(entry)) {
|
||||||
List<KeyStoreEntry> entryList = this.entrys.stream().filter(ks -> StringUtils.equals(asName, ks.getNewAsName())).collect(Collectors.toList());
|
List<KeyStoreEntry> entryList = this.entry.stream().filter(ks -> StringUtils.equals(asName, ks.getNewAsName())).collect(Collectors.toList());
|
||||||
if (CollectionUtils.isNotEmpty(entryList) && CollectionUtils.isNotEmpty(files) && files.size() == 1) {
|
if (CollectionUtils.isNotEmpty(entryList) && CollectionUtils.isNotEmpty(files) && files.size() == 1) {
|
||||||
return entryList.get(0).getOriginalAsName();
|
return entryList.get(0).getOriginalAsName();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue