Merge branch 'master' of https://github.com/metersphere/server
This commit is contained in:
commit
dc41ddc683
|
@ -224,6 +224,9 @@
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.projectId!=null">
|
||||||
|
and test_case.project_id=#{request.projectId}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
|
|
|
@ -12,4 +12,5 @@ import java.util.List;
|
||||||
public class TestCaseBatchRequest extends TestCaseWithBLOBs {
|
public class TestCaseBatchRequest extends TestCaseWithBLOBs {
|
||||||
private List<String> ids;
|
private List<String> ids;
|
||||||
private List<OrderRequest> orders;
|
private List<OrderRequest> orders;
|
||||||
|
private String projectId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ public class XmindToTestCaseParser {
|
||||||
return jsonArray.toJSONString();
|
return jsonArray.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化一个用例
|
||||||
private void newTestCase(String title, String nodePath, List<Attached> attacheds) {
|
private void newTestCase(String title, String nodePath, List<Attached> attacheds) {
|
||||||
TestCaseWithBLOBs testCase = new TestCaseWithBLOBs();
|
TestCaseWithBLOBs testCase = new TestCaseWithBLOBs();
|
||||||
testCase.setProjectId(projectId);
|
testCase.setProjectId(projectId);
|
||||||
|
@ -88,6 +89,7 @@ public class XmindToTestCaseParser {
|
||||||
String tcArr[] = tc.split(":");
|
String tcArr[] = tc.split(":");
|
||||||
if (tcArr.length != 2) {
|
if (tcArr.length != 2) {
|
||||||
process.append(Translator.get("test_case_name") + "【 " + title + " 】" + Translator.get("incorrect_format"));
|
process.append(Translator.get("test_case_name") + "【 " + title + " 】" + Translator.get("incorrect_format"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// 用例名称
|
// 用例名称
|
||||||
testCase.setName(tcArr[1].replace("tc:|tc:", ""));
|
testCase.setName(tcArr[1].replace("tc:|tc:", ""));
|
||||||
|
|
|
@ -530,17 +530,15 @@ export class HeaderManager extends DefaultTestElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class DNSCacheManager extends DefaultTestElement {
|
export class DNSCacheManager extends DefaultTestElement {
|
||||||
constructor(testName, domain, hosts) {
|
constructor(testName, hosts) {
|
||||||
super('DNSCacheManager', 'DNSCachePanel', 'DNSCacheManager', testName);
|
super('DNSCacheManager', 'DNSCachePanel', 'DNSCacheManager', testName);
|
||||||
let collectionPropServers = this.collectionProp('DNSCacheManager.servers');
|
let collectionPropServers = this.collectionProp('DNSCacheManager.servers');
|
||||||
let collectionPropHosts = this.collectionProp('DNSCacheManager.hosts');
|
let collectionPropHosts = this.collectionProp('DNSCacheManager.hosts');
|
||||||
|
|
||||||
hosts.forEach(host => {
|
hosts.forEach(host => {
|
||||||
let elementProp = collectionPropHosts.elementProp(host.domain, 'StaticHost');
|
let elementProp = collectionPropHosts.elementProp(host.domain, 'StaticHost');
|
||||||
if (host && host.domain.trim().indexOf(domain.trim()) != -1) {
|
elementProp.stringProp('StaticHost.Name', host.domain);
|
||||||
elementProp.stringProp('StaticHost.Name', host.domain);
|
elementProp.stringProp('StaticHost.Address', host.ip);
|
||||||
elementProp.stringProp('StaticHost.Address', host.ip);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let boolProp = this.boolProp('DNSCacheManager.isCustomResolver', true);
|
let boolProp = this.boolProp('DNSCacheManager.isCustomResolver', true);
|
||||||
|
|
|
@ -214,7 +214,12 @@ export class Scenario extends BaseConfig {
|
||||||
this.databaseConfigs = [];
|
this.databaseConfigs = [];
|
||||||
|
|
||||||
this.set(options);
|
this.set(options);
|
||||||
this.sets({variables: KeyValue, headers: KeyValue, requests: RequestFactory, databaseConfigs: DatabaseConfig}, options);
|
this.sets({
|
||||||
|
variables: KeyValue,
|
||||||
|
headers: KeyValue,
|
||||||
|
requests: RequestFactory,
|
||||||
|
databaseConfigs: DatabaseConfig
|
||||||
|
}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
initOptions(options = {}) {
|
initOptions(options = {}) {
|
||||||
|
@ -1046,11 +1051,20 @@ class JMXGenerator {
|
||||||
if (request.environment) {
|
if (request.environment) {
|
||||||
let commonConfig = request.environment.config.commonConfig;
|
let commonConfig = request.environment.config.commonConfig;
|
||||||
let hosts = commonConfig.hosts;
|
let hosts = commonConfig.hosts;
|
||||||
if (commonConfig.enableHost) {
|
if (commonConfig.enableHost && hosts.length > 0) {
|
||||||
let name = request.name + " DNSCacheManager";
|
let name = request.name + " DNSCacheManager";
|
||||||
if (hosts.length > 0) {
|
// 强化判断,如果未匹配到合适的host则不开启DNSCache
|
||||||
//let domain = request.environment.protocol + "://" + request.environment.domain;
|
let domain = request.environment.config.httpConfig.domain;
|
||||||
threadGroup.put(new DNSCacheManager(name, request.environment.config.httpConfig.domain, hosts));
|
let validHosts = [];
|
||||||
|
hosts.forEach(item => {
|
||||||
|
let d = item.domain.trim().replace("http://", "").replace("https://", "");
|
||||||
|
if (item && d === domain.trim()) {
|
||||||
|
item.domain = d; // 域名去掉协议
|
||||||
|
validHosts.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (validHosts.length > 0) {
|
||||||
|
threadGroup.put(new DNSCacheManager(name, validHosts));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@ export default {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
// data: {ids: [...this.selectIds]}
|
// data: {ids: [...this.selectIds]}
|
||||||
data: {ids: ids}
|
data: {ids: ids, projectId: this.currentProject.id}
|
||||||
};
|
};
|
||||||
this.result = this.$request(config).then(response => {
|
this.result = this.$request(config).then(response => {
|
||||||
const filename = this.$t('test_track.case.test_case') + ".xlsx";
|
const filename = this.$t('test_track.case.test_case') + ".xlsx";
|
||||||
|
@ -399,9 +399,22 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleBatch(type) {
|
handleBatch(type) {
|
||||||
|
|
||||||
if (this.selectRows.size < 1) {
|
if (this.selectRows.size < 1) {
|
||||||
this.$warning(this.$t('test_track.plan_view.select_manipulate'));
|
if (type === 'export') {
|
||||||
return;
|
this.$alert(this.$t('test_track.case.export_all_cases'), '', {
|
||||||
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
|
callback: (action) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
this.exportTestCase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.$warning(this.$t('test_track.plan_view.select_manipulate'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (type === 'move') {
|
if (type === 'move') {
|
||||||
let ids = Array.from(this.selectRows).map(row => row.id);
|
let ids = Array.from(this.selectRows).map(row => row.id);
|
||||||
|
|
|
@ -613,6 +613,7 @@ export default {
|
||||||
execution_result: ": Please select the execution result",
|
execution_result: ": Please select the execution result",
|
||||||
actual_result: ": The actual result is empty",
|
actual_result: ": The actual result is empty",
|
||||||
case: {
|
case: {
|
||||||
|
export_all_cases: 'Are you sure you want to export all use cases?',
|
||||||
input_test_case: 'Please enter the associated case name',
|
input_test_case: 'Please enter the associated case name',
|
||||||
test_name: 'TestName',
|
test_name: 'TestName',
|
||||||
other: '--Other--',
|
other: '--Other--',
|
||||||
|
|
|
@ -616,6 +616,7 @@ export default {
|
||||||
actual_result: ": 实际结果为空",
|
actual_result: ": 实际结果为空",
|
||||||
|
|
||||||
case: {
|
case: {
|
||||||
|
export_all_cases: '确定要导出全部用例吗?',
|
||||||
input_test_case: '请输入关联用例名称',
|
input_test_case: '请输入关联用例名称',
|
||||||
test_name: '测试名称',
|
test_name: '测试名称',
|
||||||
other: "--其他--",
|
other: "--其他--",
|
||||||
|
|
|
@ -616,6 +616,7 @@ export default {
|
||||||
actual_result: ": 實際結果為空",
|
actual_result: ": 實際結果為空",
|
||||||
|
|
||||||
case: {
|
case: {
|
||||||
|
export_all_cases: '確定要匯出全部用例嗎?',
|
||||||
input_test_case: '請輸入關聯用例名稱',
|
input_test_case: '請輸入關聯用例名稱',
|
||||||
test_name: '測試名稱',
|
test_name: '測試名稱',
|
||||||
other: "--其他--",
|
other: "--其他--",
|
||||||
|
|
Loading…
Reference in New Issue