refactor(接口测试): 部分拼写错误单词修改

This commit is contained in:
fit2-zhao 2022-10-21 14:43:02 +08:00 committed by f2c-ci-robot[bot]
parent f51f53eed9
commit dbaa3297f0
23 changed files with 42 additions and 42 deletions

View File

@ -322,8 +322,8 @@ public class MsTCPSampler extends MsTestElement {
}
private String formatMockValue(String value) {
String patten = ">@[^>@]+</?";
Pattern r = Pattern.compile(patten);
String pattern = ">@[^>@]+</?";
Pattern r = Pattern.compile(pattern);
try {
Matcher m = r.matcher(value);
while (m.find()) {

View File

@ -59,7 +59,7 @@ public class ResourcePoolCalculation {
NodeDTO node = JSON.parseObject(configuration, NodeDTO.class);
String nodeIp = node.getIp();
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);
if (nodeJvm == null) {
continue;

View File

@ -30,7 +30,7 @@ public interface ExtApiScenarioMapper {
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);

View File

@ -442,7 +442,7 @@
select *
from api_scenario
where id in (${ids})
ORDER BY FIND_IN_SET(id, ${oderId})
ORDER BY FIND_IN_SET(id, ${order})
</select>
<select id="selectReference" resultType="io.metersphere.base.domain.ApiScenario">

View File

@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
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);
}

View File

@ -6,6 +6,6 @@
where ad.report_id in (select ar.id from api_scenario_report ar where ar.project_id = #{projectId,jdbcType=VARCHAR} )
</delete>
<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>
</mapper>

View File

@ -25,7 +25,7 @@ public interface ExtTestPlanScenarioCaseMapper {
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);

View File

@ -136,7 +136,7 @@
select t.*
from test_plan_api_scenario t
where t.id in (${ids})
ORDER BY FIND_IN_SET(t.id, ${oderId})
ORDER BY FIND_IN_SET(t.id, ${order})
</select>
<select id="selectIds" resultType="java.lang.String">
select

View File

@ -1880,7 +1880,7 @@ export default {
apiImport(importData) {
if (importData && importData.data) {
importData.data.forEach(item => {
this.setApiParameter(item, "API", "OT_IMPORT");
this.setApiParameter(item, "API", "TO_IMPORT");
})
this.sort();
this.reload();

View File

@ -20,7 +20,7 @@ export function STEP() {
['DubboSampler', getDefaultSamplerMenu()],
['JDBCSampler', getDefaultSamplerMenu()],
['TCPSampler', getDefaultSamplerMenu()],
['OT_IMPORT', getDefaultSamplerMenu()],
['TO_IMPORT', getDefaultSamplerMenu()],
['AbstractSampler', getDefaultSamplerMenu()],
['IfController', getAll()],
['TransactionController', getAll()],
@ -48,7 +48,7 @@ export function STEP() {
export const ELEMENT_TYPE = {
scenario: 'scenario',
HTTPSamplerProxy: 'HTTPSamplerProxy',
OT_IMPORT: 'OT_IMPORT',
TO_IMPORT: 'TO_IMPORT',
IfController: 'IfController',
TransactionController: 'TransactionController',
ConstantTimer: 'ConstantTimer',

View File

@ -339,7 +339,7 @@ export default {
return (this.request.referenced && verifies.indexOf(this.request.referenced) !== -1);
},
isExternalImport() {
return (this.request.referenced && this.request.referenced === 'OT_IMPORT');
return (this.request.referenced && this.request.referenced === 'TO_IMPORT');
},
isCustomizeReq() {
return (!this.request.referenced || this.request.referenced === 'Created');
@ -712,12 +712,6 @@ export default {
</script>
<style scoped>
.ms-api-col-ot-import-button {
background-color: #EEF5FE;
margin-right: 20px;
color: #409EFF;
}
.icon.is-active {
transform: rotate(90deg);
}

View File

@ -226,7 +226,7 @@ export default {
return false;
},
isExternalImport() {
if (this.request.referenced && this.request.referenced === 'OT_IMPORT') {
if (this.request.referenced && this.request.referenced === 'TO_IMPORT') {
return true
}
return false;

View File

@ -899,7 +899,7 @@ export default {
apiImport(importData) {
if (importData && importData.data) {
importData.data.forEach(item => {
this.setApiParameter(item, "API", "OT_IMPORT");
this.setApiParameter(item, "API", "TO_IMPORT");
})
this.sort();
this.reload();

View File

@ -22,11 +22,11 @@ export class Environment extends BaseConfig {
export class SSLConfig extends BaseConfig {
constructor(options = {}) {
super();
this.entrys = [];
this.entry = [];
this.files = [];
this.set(options);
this.sets({files: KeyValue}, options);
this.sets({entrys: KeyValue}, options);
this.sets({entry: KeyValue}, options);
}
initOptions(options = {}) {

View File

@ -85,7 +85,7 @@
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
<el-row>
<span style="float: left">
{{ $t('api_test.home_page.detail_card.rate.case_pase') + ":" }} &nbsp;&nbsp;
{{ $t('home.table.case_pass') + ":" }} &nbsp;&nbsp;
</span>
<span class="rows-count-number" style="font-size: 14px">
<b>

View File

@ -58,7 +58,7 @@
<el-header style="height:20px;padding: 0px;margin-bottom: 5px;font-size: 14px">
<el-row>
<span style="float: left">
{{ $t('api_test.home_page.detail_card.rate.scenario_pase') + ":" }}&nbsp;&nbsp;
{{ $t('home.table.scenario_pass') + ":" }}&nbsp;&nbsp;
</span>
<span class="rows-count-number" style="font-size: 14px">
<b>

View File

@ -29,6 +29,8 @@ const message = {
next_execution_time: "Next Execution Time",
create_user: "Creator",
update_time: "Update time",
case_pass: "Case pass rate",
scenario_pass: "Scenario pass rate",
},
case: {
index: "Ranking",

View File

@ -29,6 +29,8 @@ const message = {
next_execution_time: "下次执行时间",
create_user: "创建人",
update_time: "更新时间",
case_pass: "用例通过率",
scenario_pass: "场景通过率",
},
case: {
index: "排名",

View File

@ -29,6 +29,8 @@ const message = {
next_execution_time: "下次執行時間",
create_user: "創建人",
update_time: "更新時間",
case_pass: "用例通過率",
scenario_pass: "場景通過率",
},
case: {
index: "排名",

View File

@ -38,7 +38,7 @@
</div>
<p class="tip">{{ this.$t('commons.ssl.entry') }} </p>
<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
width="180"/>
<el-table-column prop="newAsName" :label="$t('commons.ssl.new_as_name')" show-overflow-tooltip
@ -145,7 +145,7 @@ export default {
item.password = "";
item.default = false;
this.sslConfig.entrys.unshift(item);
this.sslConfig.entry.unshift(item);
})
this.sslConfig.files.unshift(sslFile);
} else {
@ -159,7 +159,7 @@ export default {
}
item.password = "";
item.default = false;
this.sslConfig.entrys.unshift(item);
this.sslConfig.entry.unshift(item);
})
this.sslConfig.files.unshift(sslFile);
}
@ -170,24 +170,24 @@ export default {
const index = this.sslConfig.files.findIndex((d) => d.id === row.id);
this.sslConfig.files.splice(index, 1);
//
if (this.sslConfig.entrys) {
if (this.sslConfig.entry) {
let removeKeys = [];
this.sslConfig.entrys.forEach(item => {
this.sslConfig.entry.forEach(item => {
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.forEach(index => {
if (index !== -1) {
this.sslConfig.entrys.splice(index, 1);
this.sslConfig.entry.splice(index, 1);
}
})
}
},
changeCheck(row) {
if (row.default) {
this.sslConfig.entrys.forEach(item => {
this.sslConfig.entry.forEach(item => {
if (item && item.sourceId !== row.id) {
item.default = false;
}

View File

@ -23,11 +23,11 @@ export class Environment extends BaseConfig {
export class SSLConfig extends BaseConfig {
constructor(options = {}) {
super();
this.entrys = [];
this.entry = [];
this.files = [];
this.set(options);
this.sets({files: KeyValue}, options);
this.sets({entrys: KeyValue}, options);
this.sets({entry: KeyValue}, options);
}
initOptions(options = {}) {

View File

@ -101,8 +101,8 @@ public class CommandService {
this.createKeyStore("ms-run", newKeyStore);
// 修改别名
Map<String, List<KeyStoreEntry>> entryMap = new HashMap<>();
if (sslConfig != null && CollectionUtils.isNotEmpty(sslConfig.getEntrys())) {
sslConfig.getEntrys().forEach(item -> {
if (sslConfig != null && CollectionUtils.isNotEmpty(sslConfig.getEntry())) {
sslConfig.getEntry().forEach(item -> {
if (entryMap.containsKey(item.getSourceId())) {
entryMap.get(item.getSourceId()).add(item);
} else {

View File

@ -9,12 +9,12 @@ import java.util.stream.Collectors;
@Data
public class KeyStoreConfig {
private List<KeyStoreEntry> entrys;
private List<KeyStoreEntry> entry;
private List<KeyStoreFile> files;
public String getDefaultAlias() {
if (CollectionUtils.isNotEmpty(entrys)) {
List<KeyStoreEntry> entryList = this.entrys.stream().filter(KeyStoreEntry::isDefault).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(entry)) {
List<KeyStoreEntry> entryList = this.entry.stream().filter(KeyStoreEntry::isDefault).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(entryList)) {
if (StringUtils.isNotEmpty(entryList.get(0).getNewAsName())) {
return entryList.get(0).getNewAsName();
@ -27,8 +27,8 @@ public class KeyStoreConfig {
}
public String getAlias(String asName) {
if (CollectionUtils.isNotEmpty(entrys)) {
List<KeyStoreEntry> entryList = this.entrys.stream().filter(ks -> StringUtils.equals(asName, ks.getNewAsName())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(entry)) {
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) {
return entryList.get(0).getOriginalAsName();
}