Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
e3b43782
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,发现更多精彩内容 >>
提交
e3b43782
编写于
9月 18, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(接口测试): 支持提取接口到变量
上级
18c300f8
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
26 addition
and
21 deletion
+26
-21
backend/src/main/java/io/metersphere/api/dto/scenario/request/SqlRequest.java
...a/io/metersphere/api/dto/scenario/request/SqlRequest.java
+4
-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/ApiSqlRequestForm.vue
...ponents/api/test/components/request/ApiSqlRequestForm.vue
+8
-0
frontend/src/business/components/api/test/model/JMX.js
frontend/src/business/components/api/test/model/JMX.js
+2
-17
frontend/src/business/components/api/test/model/ScenarioModel.js
...d/src/business/components/api/test/model/ScenarioModel.js
+4
-2
frontend/src/business/components/xpack
frontend/src/business/components/xpack
+1
-1
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+2
-0
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+2
-0
frontend/src/i18n/zh-TW.js
frontend/src/i18n/zh-TW.js
+2
-0
未找到文件。
backend/src/main/java/io/metersphere/api/dto/scenario/request/SqlRequest.java
浏览文件 @
e3b43782
...
...
@@ -37,4 +37,8 @@ public class SqlRequest implements Request {
private
JSR223PreProcessor
jsr223PreProcessor
;
@JSONField
(
ordinal
=
12
)
private
JSR223PostProcessor
jsr223PostProcessor
;
@JSONField
(
ordinal
=
13
)
private
String
resultVariable
;
@JSONField
(
ordinal
=
14
)
private
String
variableNames
;
}
xpack
@
d5b49696
比较
321c8699
...
d5b49696
Subproject commit
321c869938357e8c2253e5bd86c963828664ae23
Subproject commit
d5b4969642fd8d10cc2f949d7377e0a0e5217a3a
frontend/src/business/components/api/test/components/request/ApiSqlRequestForm.vue
浏览文件 @
e3b43782
...
...
@@ -11,6 +11,14 @@
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('api_test.request.sql.result_variable')"
prop=
"resultVariable"
>
<el-input
v-model=
"request.resultVariable"
maxlength=
"300"
show-word-limit
/>
</el-form-item>
<el-form-item
:label=
"$t('api_test.request.sql.variable_names')"
prop=
"variableNames"
>
<el-input
v-model=
"request.variableNames"
maxlength=
"300"
show-word-limit
/>
</el-form-item>
<!--
<el-form-item
:label=
"'查询类型'"
prop=
"protocol"
>
-->
<!--
<el-select
v-model=
"request.queryType"
>
-->
<!--
<el-option
label=
"dubbo://"
:value=
"protocols.DUBBO"
/>
-->
...
...
frontend/src/business/components/api/test/model/JMX.js
浏览文件 @
e3b43782
...
...
@@ -281,31 +281,16 @@ export class JDBCSampler extends DefaultTestElement {
this
.
stringProp
(
"
dataSource
"
,
request
.
dataSource
);
this
.
stringProp
(
"
query
"
,
request
.
query
);
this
.
stringProp
(
"
queryTimeout
"
,
request
.
queryTimeout
);
this
.
stringProp
(
"
resultVariable
"
,
request
.
resultVariable
);
this
.
stringProp
(
"
variableNames
"
,
request
.
variableNames
);
this
.
stringProp
(
"
queryArguments
"
);
this
.
stringProp
(
"
queryArgumentsTypes
"
);
this
.
stringProp
(
"
resultSetMaxRows
"
);
this
.
stringProp
(
"
resultVariable
"
);
this
.
stringProp
(
"
variableNames
"
);
this
.
stringProp
(
"
resultSetHandler
"
,
'
Store as String
'
);
this
.
stringProp
(
"
queryType
"
,
'
Callable Statement
'
);
}
}
// <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC Request" enabled="true">
// <stringProp name="dataSource">test</stringProp>
// <stringProp name="query">select id from test_plan;
// select name from test_plan;
// </stringProp>
// <stringProp name="queryArguments"></stringProp>
// <stringProp name="queryArgumentsTypes"></stringProp>
// <stringProp name="queryTimeout"></stringProp>
// <stringProp name="queryType">Callable Statement</stringProp>
// <stringProp name="resultSetHandler">Store as String</stringProp>
// <stringProp name="resultSetMaxRows"></stringProp>
// <stringProp name="resultVariable"></stringProp>
// <stringProp name="variableNames"></stringProp>
// </JDBCSampler>
export
class
HTTPSamplerProxy
extends
DefaultTestElement
{
constructor
(
testName
,
options
=
{})
{
super
(
'
HTTPSamplerProxy
'
,
'
HttpTestSampleGui
'
,
'
HTTPSamplerProxy
'
,
testName
);
...
...
frontend/src/business/components/api/test/model/ScenarioModel.js
浏览文件 @
e3b43782
...
...
@@ -482,6 +482,8 @@ export class SqlRequest extends Request {
this
.
id
=
options
.
id
||
uuid
();
this
.
name
=
options
.
name
;
this
.
useEnvironment
=
options
.
useEnvironment
;
this
.
resultVariable
=
options
.
resultVariable
;
this
.
variableNames
=
options
.
variableNames
;
this
.
debugReport
=
undefined
;
this
.
dataSource
=
options
.
dataSource
;
this
.
query
=
options
.
query
;
...
...
@@ -1080,7 +1082,7 @@ class JMXGenerator {
this
.
addConstantsTimer
(
sampler
,
request
);
if
(
request
.
controller
.
isValid
()
&&
request
.
controller
.
enable
)
{
if
(
request
.
controller
&&
request
.
controller
.
isValid
()
&&
request
.
controller
.
enable
)
{
if
(
request
.
controller
instanceof
IfController
)
{
let
controller
=
this
.
getController
(
sampler
,
request
);
threadGroup
.
put
(
controller
);
...
...
@@ -1207,7 +1209,7 @@ class JMXGenerator {
}
addConstantsTimer
(
sampler
,
request
)
{
if
(
request
.
timer
.
isValid
()
&&
request
.
timer
.
enable
)
{
if
(
request
.
timer
&&
request
.
timer
.
isValid
()
&&
request
.
timer
.
enable
)
{
sampler
.
put
(
new
JMXConstantTimer
(
request
.
timer
.
label
(),
request
.
timer
));
}
}
...
...
xpack
@
0a375848
比较
f2d5a342
...
0a375848
Subproject commit
f2d5a342c82e629f510550d5778d752bb73bf5e7
Subproject commit
0a375848d034d20eaf05caf11769e1c75c39235c
frontend/src/i18n/en-US.js
浏览文件 @
e3b43782
...
...
@@ -551,6 +551,8 @@ export default {
query_timeout
:
"
Max Wait(ms)
"
,
name_cannot_be_empty
:
"
SQL request name cannot be empty
"
,
dataSource_cannot_be_empty
:
"
SQL request datasource cannot be empty
"
,
result_variable
:
"
Result variable
"
,
variable_names
:
"
Variable names
"
,
},
api_import
:
{
label
:
"
Import
"
,
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
e3b43782
...
...
@@ -552,6 +552,8 @@ export default {
query_timeout
:
"
最大等待时间(ms)
"
,
name_cannot_be_empty
:
"
SQL请求名称不能为空
"
,
dataSource_cannot_be_empty
:
"
SQL请求数据源不能为空
"
,
result_variable
:
"
存储结果
"
,
variable_names
:
"
按列存储
"
,
}
},
api_import
:
{
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
e3b43782
...
...
@@ -552,6 +552,8 @@ export default {
query_timeout
:
"
最大等待時間(ms)
"
,
name_cannot_be_empty
:
"
SQL請求名稱不能為空
"
,
dataSource_cannot_be_empty
:
"
SQL請求數據源不能為空
"
,
result_variable
:
"
存儲結果
"
,
variable_names
:
"
按列存儲
"
,
}
},
api_import
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录