Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
d820bf40
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,发现更多精彩内容 >>
提交
d820bf40
编写于
8月 18, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(接口测试): dubbo BeanShell
上级
65a033ce
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
6 deletion
+25
-6
backend/src/main/java/io/metersphere/api/dto/scenario/request/DubboRequest.java
...io/metersphere/api/dto/scenario/request/DubboRequest.java
+6
-0
backend/src/main/java/io/metersphere/xpack
backend/src/main/java/io/metersphere/xpack
+1
-1
frontend/src/business/components/api/test/components/request/ApiDubboRequestForm.vue
...nents/api/test/components/request/ApiDubboRequestForm.vue
+10
-0
frontend/src/business/components/api/test/model/ScenarioModel.js
...d/src/business/components/api/test/model/ScenarioModel.js
+7
-4
frontend/src/business/components/xpack
frontend/src/business/components/xpack
+1
-1
未找到文件。
backend/src/main/java/io/metersphere/api/dto/scenario/request/DubboRequest.java
浏览文件 @
d820bf40
...
...
@@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import
io.metersphere.api.dto.scenario.KeyValue
;
import
io.metersphere.api.dto.scenario.assertions.Assertions
;
import
io.metersphere.api.dto.scenario.extract.Extract
;
import
io.metersphere.api.dto.scenario.processor.BeanShellPostProcessor
;
import
io.metersphere.api.dto.scenario.processor.BeanShellPreProcessor
;
import
io.metersphere.api.dto.scenario.request.dubbo.ConfigCenter
;
import
io.metersphere.api.dto.scenario.request.dubbo.ConsumerAndService
;
import
io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter
;
...
...
@@ -43,4 +45,8 @@ public class DubboRequest implements Request {
private
Assertions
assertions
;
@JSONField
(
ordinal
=
11
)
private
Extract
extract
;
@JSONField
(
ordinal
=
12
)
private
BeanShellPreProcessor
beanShellPreProcessor
;
@JSONField
(
ordinal
=
13
)
private
BeanShellPostProcessor
beanShellPostProcessor
;
}
xpack
@
b86032cb
比较
8eff3436
...
b86032cb
Subproject commit
8eff343619df1572e1cded52f173257ef4b518a1
Subproject commit
b86032cbbda9a9e6028308aa95a887cff2192f1c
frontend/src/business/components/api/test/components/request/ApiDubboRequestForm.vue
浏览文件 @
d820bf40
...
...
@@ -44,6 +44,12 @@
<el-tab-pane
:label=
"$t('api_test.request.extract.label')"
name=
"extract"
>
<ms-api-extract
:is-read-only=
"isReadOnly"
:extract=
"request.extract"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('api_test.request.processor.pre_exec_script')"
name=
"beanShellPreProcessor"
>
<ms-bean-shell-processor
:is-read-only=
"isReadOnly"
:bean-shell-processor=
"request.beanShellPreProcessor"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('api_test.request.processor.post_exec_script')"
name=
"beanShellPostProcessor"
>
<ms-bean-shell-processor
:is-read-only=
"isReadOnly"
:bean-shell-processor=
"request.beanShellPostProcessor"
/>
</el-tab-pane>
</el-tabs>
</el-form>
</
template
>
...
...
@@ -59,10 +65,12 @@
import
MsDubboRegistryCenter
from
"
@/business/components/api/test/components/request/dubbo/RegistryCenter
"
;
import
MsDubboConfigCenter
from
"
@/business/components/api/test/components/request/dubbo/ConfigCenter
"
;
import
MsDubboConsumerService
from
"
@/business/components/api/test/components/request/dubbo/ConsumerAndService
"
;
import
MsBeanShellProcessor
from
"
../processor/BeanShellProcessor
"
;
export
default
{
name
:
"
MsApiDubboRequestForm
"
,
components
:
{
MsBeanShellProcessor
,
MsDubboConsumerService
,
MsDubboConfigCenter
,
MsDubboRegistryCenter
,
...
...
@@ -134,4 +142,6 @@
color
:
#F56C6C
;
}
</
style
>
frontend/src/business/components/api/test/model/ScenarioModel.js
浏览文件 @
d820bf40
...
...
@@ -381,6 +381,8 @@ export class DubboRequest extends Request {
// Scenario.dubboConfig
this
.
dubboConfig
=
undefined
;
this
.
debugReport
=
undefined
;
this
.
beanShellPreProcessor
=
new
BeanShellProcessor
(
options
.
beanShellPreProcessor
);
this
.
beanShellPostProcessor
=
new
BeanShellProcessor
(
options
.
beanShellPostProcessor
);
this
.
sets
({
args
:
KeyValue
,
attachmentArgs
:
KeyValue
},
options
);
}
...
...
@@ -831,9 +833,10 @@ class JMXGenerator {
}
else
{
this
.
addRequestBody
(
sampler
,
request
);
}
this
.
addBeanShellProcessor
(
sampler
,
request
);
}
this
.
addBeanShellProcessor
(
sampler
,
request
);
this
.
addRequestAssertion
(
sampler
,
request
);
this
.
addRequestExtractor
(
sampler
,
request
);
...
...
@@ -900,13 +903,13 @@ class JMXGenerator {
}
}
addBeanShellProcessor
(
httpSamplerProxy
,
request
)
{
addBeanShellProcessor
(
sampler
,
request
)
{
let
name
=
request
.
name
;
if
(
request
.
beanShellPreProcessor
&&
request
.
beanShellPreProcessor
.
script
)
{
httpSamplerProxy
.
put
(
new
BeanShellPreProcessor
(
name
,
request
.
beanShellPreProcessor
));
sampler
.
put
(
new
BeanShellPreProcessor
(
name
,
request
.
beanShellPreProcessor
));
}
if
(
request
.
beanShellPostProcessor
&&
request
.
beanShellPostProcessor
.
script
)
{
httpSamplerProxy
.
put
(
new
BeanShellPostProcessor
(
name
,
request
.
beanShellPostProcessor
));
sampler
.
put
(
new
BeanShellPostProcessor
(
name
,
request
.
beanShellPostProcessor
));
}
}
...
...
xpack
@
7e4d80cc
比较
06fc0a32
...
7e4d80cc
Subproject commit
06fc0a321a9886419be5c607ddaa6b40efb5179b
Subproject commit
7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录