Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
9d9e1c19
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9d9e1c19
编写于
4月 03, 2020
作者:
C
Captain.B
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去掉 removeChildren
上级
e5b9800a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
51 addition
and
23 deletion
+51
-23
backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java
...etersphere/parse/xml/reader/jmx/JmeterDocumentParser.java
+28
-18
frontend/src/business/components/performance/test/PerformanceTestPlan.vue
...iness/components/performance/test/PerformanceTestPlan.vue
+23
-5
未找到文件。
backend/src/main/java/io/metersphere/parse/xml/reader/jmx/JmeterDocumentParser.java
浏览文件 @
9d9e1c19
...
...
@@ -123,7 +123,6 @@ public class JmeterDocumentParser implements DocumentParser {
for
(
int
i
=
0
;
i
<
childNodes
.
getLength
();
i
++)
{
Node
item
=
childNodes
.
item
(
i
);
if
(
item
instanceof
Element
&&
nodeNameEquals
(
item
,
"collectionProp"
))
{
removeChildren
(
item
);
Document
document
=
item
.
getOwnerDocument
();
Object
params
=
context
.
getProperty
(
"statusCode"
);
if
(
params
instanceof
List
)
{
...
...
@@ -152,6 +151,15 @@ public class JmeterDocumentParser implements DocumentParser {
Node
item
=
childNodes
.
item
(
i
);
if
(
nodeNameEquals
(
item
,
RESPONSE_ASSERTION
))
{
// 如果已经存在,不再添加
removeChildren
(
item
);
Element
collectionProp
=
document
.
createElement
(
COLLECTION_PROP
);
collectionProp
.
setAttribute
(
"name"
,
"Asserion.test_strings"
);
//
item
.
appendChild
(
collectionProp
);
item
.
appendChild
(
createStringProp
(
document
,
"Assertion.custom_message"
,
""
));
item
.
appendChild
(
createStringProp
(
document
,
"Assertion.test_field"
,
"Assertion.response_code"
));
item
.
appendChild
(
createBoolProp
(
document
,
"Assertion.assume_success"
,
false
));
item
.
appendChild
(
createIntProp
(
document
,
"Assertion.test_type"
,
40
));
return
;
}
}
...
...
@@ -181,7 +189,7 @@ public class JmeterDocumentParser implements DocumentParser {
responseAssertion
.
appendChild
(
createStringProp
(
document
,
"Assertion.custom_message"
,
""
));
responseAssertion
.
appendChild
(
createStringProp
(
document
,
"Assertion.test_field"
,
"Assertion.response_code"
));
responseAssertion
.
appendChild
(
createBoolProp
(
document
,
"Assertion.assume_success"
,
false
));
responseAssertion
.
appendChild
(
createIntProp
(
document
,
"Assertion.test_type"
,
33
));
responseAssertion
.
appendChild
(
createIntProp
(
document
,
"Assertion.test_type"
,
40
));
hashTree
.
appendChild
(
responseAssertion
);
hashTree
.
appendChild
(
document
.
createElement
(
HASH_TREE_ELEMENT
));
}
...
...
@@ -352,7 +360,7 @@ public class JmeterDocumentParser implements DocumentParser {
for
(
int
i
=
0
;
i
<
childNodes
.
getLength
();
i
++)
{
Node
item
=
childNodes
.
item
(
i
);
if
(
item
instanceof
Element
&&
nodeNameEquals
(
item
,
"collectionProp"
))
{
removeChildren
(
item
);
//
Document
document
=
item
.
getOwnerDocument
();
Object
params
=
context
.
getProperty
(
"params"
);
if
(
params
instanceof
List
)
{
...
...
@@ -377,16 +385,20 @@ public class JmeterDocumentParser implements DocumentParser {
private
void
processDnsCacheManager
(
Element
ele
)
{
Object
domains
=
context
.
getProperty
(
"domains"
);
if
(!(
domains
instanceof
List
))
{
return
;
}
if
(((
List
)
domains
).
size
()
==
0
)
{
return
;
}
NodeList
childNodes
=
ele
.
getChildNodes
();
for
(
int
i
=
0
,
size
=
childNodes
.
getLength
();
i
<
size
;
i
++)
{
Node
item
=
childNodes
.
item
(
i
);
if
(
item
instanceof
Element
&&
nodeNameEquals
(
item
,
"collectionProp"
)
&&
org
.
apache
.
commons
.
lang3
.
StringUtils
.
equals
(((
Element
)
item
).
getAttribute
(
"name"
),
"DNSCacheManager.hosts"
))
{
removeChildren
(
item
);
Document
document
=
item
.
getOwnerDocument
();
Object
domains
=
context
.
getProperty
(
"domains"
);
if
(
domains
instanceof
List
)
{
for
(
Object
d
:
(
List
)
domains
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
d
.
toString
());
if
(!
jsonObject
.
getBooleanValue
(
"enable"
))
{
...
...
@@ -400,8 +412,6 @@ public class JmeterDocumentParser implements DocumentParser {
item
.
appendChild
(
elementProp
);
}
}
}
if
(
item
instanceof
Element
&&
nodeNameEquals
(
item
,
"boolProp"
)
&&
org
.
apache
.
commons
.
lang3
.
StringUtils
.
equals
(((
Element
)
item
).
getAttribute
(
"name"
),
"DNSCacheManager.isCustomResolver"
))
{
item
.
getFirstChild
().
setNodeValue
(
"true"
);
...
...
frontend/src/business/components/performance/test/PerformanceTestPlan.vue
浏览文件 @
9d9e1c19
...
...
@@ -22,11 +22,6 @@
width=
"150"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"description"
:label=
"$t('commons.description')"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
prop=
"projectName"
:label=
"$t('load_test.project_name')"
...
...
@@ -47,6 +42,29 @@
<span>
{{
scope
.
row
.
updateTime
|
timestampFormatDate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
:label=
"$t('commons.status')"
>
<
template
v-slot:default=
"{row}"
>
<el-tag
size=
"mini"
type=
"primary"
v-if=
"row.status === 'Starting'"
>
{{
row
.
status
}}
</el-tag>
<el-tag
size=
"mini"
type=
"success"
v-else-if=
"row.status === 'Running'"
>
{{
row
.
status
}}
</el-tag>
<el-tooltip
placement=
"top"
v-else-if=
"row.status === 'Error'"
effect=
"light"
>
<template
v-slot:content
>
<div>
{{
row
.
description
}}
</div>
</
template
>
<el-tag
size=
"mini"
type=
"danger"
>
{{ row.status }}
</el-tag>
</el-tooltip>
<el-tag
size=
"mini"
type=
"info"
v-else
>
{{ row.status }}
</el-tag>
</template>
</el-table-column>
<el-table-column
width=
"150"
:label=
"$t('commons.operating')"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录