Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
a950c03a
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,发现更多精彩内容 >>
提交
a950c03a
编写于
3月 13, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善功能测试前后端
上级
cc78b8da
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
3909 addition
and
36 deletion
+3909
-36
backend/src/main/java/io/metersphere/base/domain/FucTest.java
...end/src/main/java/io/metersphere/base/domain/FucTest.java
+67
-0
backend/src/main/java/io/metersphere/base/domain/FucTestExample.java
.../main/java/io/metersphere/base/domain/FucTestExample.java
+600
-0
backend/src/main/java/io/metersphere/base/domain/FucTestFile.java
...src/main/java/io/metersphere/base/domain/FucTestFile.java
+27
-0
backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java
...n/java/io/metersphere/base/domain/FucTestFileExample.java
+340
-0
backend/src/main/java/io/metersphere/base/domain/FucTestReport.java
...c/main/java/io/metersphere/base/domain/FucTestReport.java
+87
-0
backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java
...java/io/metersphere/base/domain/FucTestReportExample.java
+670
-0
backend/src/main/java/io/metersphere/base/domain/FucTestWithBLOBs.java
...ain/java/io/metersphere/base/domain/FucTestWithBLOBs.java
+27
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java
...in/java/io/metersphere/base/mapper/FucTestFileMapper.java
+22
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml
...ain/java/io/metersphere/base/mapper/FucTestFileMapper.xml
+140
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java
...c/main/java/io/metersphere/base/mapper/FucTestMapper.java
+37
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml
...rc/main/java/io/metersphere/base/mapper/FucTestMapper.xml
+302
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.java
.../java/io/metersphere/base/mapper/FucTestReportMapper.java
+36
-0
backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml
...n/java/io/metersphere/base/mapper/FucTestReportMapper.xml
+304
-0
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java
.../metersphere/base/mapper/ext/ExtFunctionalTestMapper.java
+11
-0
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml
...o/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml
+33
-0
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java
...sphere/base/mapper/ext/ExtFunctionalTestReportMapper.java
+15
-0
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml
...rsphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml
+24
-0
backend/src/main/java/io/metersphere/controller/FunctionalReportController.java
...io/metersphere/controller/FunctionalReportController.java
+56
-0
backend/src/main/java/io/metersphere/controller/FunctionalTestController.java
...a/io/metersphere/controller/FunctionalTestController.java
+99
-0
backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java
...ersphere/controller/request/testplan/TestPlanRequest.java
+114
-2
backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java
...src/main/java/io/metersphere/dto/FunctionalReportDTO.java
+104
-0
backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java
...d/src/main/java/io/metersphere/dto/FunctionalTestDTO.java
+15
-0
backend/src/main/java/io/metersphere/service/FileService.java
...end/src/main/java/io/metersphere/service/FileService.java
+14
-0
backend/src/main/java/io/metersphere/service/FuctionalTestService.java
...ain/java/io/metersphere/service/FuctionalTestService.java
+197
-0
backend/src/main/java/io/metersphere/service/FunctionalReportService.java
.../java/io/metersphere/service/FunctionalReportService.java
+41
-0
backend/src/main/resources/db/migration/V4__init_funcional.sql
...nd/src/main/resources/db/migration/V4__init_funcional.sql
+38
-0
frontend/src/assets/browser/chrome.svg
frontend/src/assets/browser/chrome.svg
+6
-0
frontend/src/assets/browser/firefox.svg
frontend/src/assets/browser/firefox.svg
+6
-0
frontend/src/assets/browser/ie.svg
frontend/src/assets/browser/ie.svg
+6
-0
frontend/src/assets/browser/opera.svg
frontend/src/assets/browser/opera.svg
+6
-0
frontend/src/business/components/common/router/router.js
frontend/src/business/components/common/router/router.js
+6
-0
frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue
...ess/components/functional/plan/EditFunctionalTestPlan.vue
+15
-21
frontend/src/business/components/functional/plan/FunctionalTestPlan.vue
...usiness/components/functional/plan/FunctionalTestPlan.vue
+3
-3
frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue
...unctional/plan/components/FunctionalTestRuntimeConfig.vue
+106
-1
frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue
.../functional/plan/components/FunctionalTestSceneConfig.vue
+183
-5
frontend/src/business/components/functional/report/FunctionalRecentReport.vue
...s/components/functional/report/FunctionalRecentReport.vue
+2
-2
frontend/src/business/components/functional/report/FunctionalReportView.vue
...ess/components/functional/report/FunctionalReportView.vue
+127
-0
frontend/src/business/components/functional/report/FunctionalTestReport.vue
...ess/components/functional/report/FunctionalTestReport.vue
+2
-2
frontend/src/business/components/functional/report/components/LogDetails.vue
...ss/components/functional/report/components/LogDetails.vue
+15
-0
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+3
-0
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+3
-0
未找到文件。
backend/src/main/java/io/metersphere/base/domain/FucTest.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.io.Serializable
;
public
class
FucTest
implements
Serializable
{
private
String
id
;
private
String
projectId
;
private
String
name
;
private
String
description
;
private
Long
createTime
;
private
Long
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
==
null
?
null
:
id
.
trim
();
}
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
==
null
?
null
:
projectId
.
trim
();
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
==
null
?
null
:
description
.
trim
();
}
public
Long
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Long
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Long
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestExample.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FucTestExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FucTestExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
String
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
String
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
String
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
String
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLike
(
String
value
)
{
addCriterion
(
"id like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotLike
(
String
value
)
{
addCriterion
(
"id not like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdIsNull
()
{
addCriterion
(
"project_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdIsNotNull
()
{
addCriterion
(
"project_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdEqualTo
(
String
value
)
{
addCriterion
(
"project_id ="
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdNotEqualTo
(
String
value
)
{
addCriterion
(
"project_id <>"
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdGreaterThan
(
String
value
)
{
addCriterion
(
"project_id >"
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"project_id >="
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdLessThan
(
String
value
)
{
addCriterion
(
"project_id <"
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"project_id <="
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdLike
(
String
value
)
{
addCriterion
(
"project_id like"
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdNotLike
(
String
value
)
{
addCriterion
(
"project_id not like"
,
value
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"project_id in"
,
values
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"project_id not in"
,
values
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"project_id between"
,
value1
,
value2
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"project_id not between"
,
value1
,
value2
,
"projectId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNull
()
{
addCriterion
(
"name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNotNull
()
{
addCriterion
(
"name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameEqualTo
(
String
value
)
{
addCriterion
(
"name ="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotEqualTo
(
String
value
)
{
addCriterion
(
"name <>"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThan
(
String
value
)
{
addCriterion
(
"name >"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"name >="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThan
(
String
value
)
{
addCriterion
(
"name <"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"name <="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLike
(
String
value
)
{
addCriterion
(
"name like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotLike
(
String
value
)
{
addCriterion
(
"name not like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"name in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"name not in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"name between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"name not between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNull
()
{
addCriterion
(
"description is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNotNull
()
{
addCriterion
(
"description is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionEqualTo
(
String
value
)
{
addCriterion
(
"description ="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotEqualTo
(
String
value
)
{
addCriterion
(
"description <>"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThan
(
String
value
)
{
addCriterion
(
"description >"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description >="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThan
(
String
value
)
{
addCriterion
(
"description <"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description <="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLike
(
String
value
)
{
addCriterion
(
"description like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotLike
(
String
value
)
{
addCriterion
(
"description not like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIn
(
List
<
String
>
values
)
{
addCriterion
(
"description in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"description not in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description not between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Long
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Long
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestFile.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.io.Serializable
;
public
class
FucTestFile
implements
Serializable
{
private
String
testId
;
private
String
fileId
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getTestId
()
{
return
testId
;
}
public
void
setTestId
(
String
testId
)
{
this
.
testId
=
testId
==
null
?
null
:
testId
.
trim
();
}
public
String
getFileId
()
{
return
fileId
;
}
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
==
null
?
null
:
fileId
.
trim
();
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FucTestFileExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FucTestFileExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andTestIdIsNull
()
{
addCriterion
(
"test_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdIsNotNull
()
{
addCriterion
(
"test_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdEqualTo
(
String
value
)
{
addCriterion
(
"test_id ="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotEqualTo
(
String
value
)
{
addCriterion
(
"test_id <>"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdGreaterThan
(
String
value
)
{
addCriterion
(
"test_id >"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"test_id >="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLessThan
(
String
value
)
{
addCriterion
(
"test_id <"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"test_id <="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLike
(
String
value
)
{
addCriterion
(
"test_id like"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotLike
(
String
value
)
{
addCriterion
(
"test_id not like"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"test_id in"
,
values
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"test_id not in"
,
values
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"test_id between"
,
value1
,
value2
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"test_id not between"
,
value1
,
value2
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdIsNull
()
{
addCriterion
(
"file_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdIsNotNull
()
{
addCriterion
(
"file_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdEqualTo
(
String
value
)
{
addCriterion
(
"file_id ="
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdNotEqualTo
(
String
value
)
{
addCriterion
(
"file_id <>"
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdGreaterThan
(
String
value
)
{
addCriterion
(
"file_id >"
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"file_id >="
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdLessThan
(
String
value
)
{
addCriterion
(
"file_id <"
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"file_id <="
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdLike
(
String
value
)
{
addCriterion
(
"file_id like"
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdNotLike
(
String
value
)
{
addCriterion
(
"file_id not like"
,
value
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"file_id in"
,
values
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"file_id not in"
,
values
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"file_id between"
,
value1
,
value2
,
"fileId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"file_id not between"
,
value1
,
value2
,
"fileId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestReport.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.io.Serializable
;
public
class
FucTestReport
implements
Serializable
{
private
String
id
;
private
String
testId
;
private
String
name
;
private
String
description
;
private
Long
createTime
;
private
Long
updateTime
;
private
String
status
;
private
String
content
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
==
null
?
null
:
id
.
trim
();
}
public
String
getTestId
()
{
return
testId
;
}
public
void
setTestId
(
String
testId
)
{
this
.
testId
=
testId
==
null
?
null
:
testId
.
trim
();
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
==
null
?
null
:
description
.
trim
();
}
public
Long
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Long
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Long
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
==
null
?
null
:
status
.
trim
();
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
==
null
?
null
:
content
.
trim
();
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FucTestReportExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FucTestReportExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
String
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
String
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
String
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
String
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLike
(
String
value
)
{
addCriterion
(
"id like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotLike
(
String
value
)
{
addCriterion
(
"id not like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdIsNull
()
{
addCriterion
(
"test_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdIsNotNull
()
{
addCriterion
(
"test_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdEqualTo
(
String
value
)
{
addCriterion
(
"test_id ="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotEqualTo
(
String
value
)
{
addCriterion
(
"test_id <>"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdGreaterThan
(
String
value
)
{
addCriterion
(
"test_id >"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"test_id >="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLessThan
(
String
value
)
{
addCriterion
(
"test_id <"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"test_id <="
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdLike
(
String
value
)
{
addCriterion
(
"test_id like"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotLike
(
String
value
)
{
addCriterion
(
"test_id not like"
,
value
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"test_id in"
,
values
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"test_id not in"
,
values
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"test_id between"
,
value1
,
value2
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTestIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"test_id not between"
,
value1
,
value2
,
"testId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNull
()
{
addCriterion
(
"name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIsNotNull
()
{
addCriterion
(
"name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameEqualTo
(
String
value
)
{
addCriterion
(
"name ="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotEqualTo
(
String
value
)
{
addCriterion
(
"name <>"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThan
(
String
value
)
{
addCriterion
(
"name >"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"name >="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThan
(
String
value
)
{
addCriterion
(
"name <"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"name <="
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameLike
(
String
value
)
{
addCriterion
(
"name like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotLike
(
String
value
)
{
addCriterion
(
"name not like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameIn
(
List
<
String
>
values
)
{
addCriterion
(
"name in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"name not in"
,
values
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"name between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"name not between"
,
value1
,
value2
,
"name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNull
()
{
addCriterion
(
"description is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNotNull
()
{
addCriterion
(
"description is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionEqualTo
(
String
value
)
{
addCriterion
(
"description ="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotEqualTo
(
String
value
)
{
addCriterion
(
"description <>"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThan
(
String
value
)
{
addCriterion
(
"description >"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description >="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThan
(
String
value
)
{
addCriterion
(
"description <"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"description <="
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionLike
(
String
value
)
{
addCriterion
(
"description like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotLike
(
String
value
)
{
addCriterion
(
"description not like"
,
value
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIn
(
List
<
String
>
values
)
{
addCriterion
(
"description in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"description not in"
,
values
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"description not between"
,
value1
,
value2
,
"description"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Long
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Long
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Long
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Long
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Long
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Long
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNull
()
{
addCriterion
(
"status is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIsNotNull
()
{
addCriterion
(
"status is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusEqualTo
(
String
value
)
{
addCriterion
(
"status ="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotEqualTo
(
String
value
)
{
addCriterion
(
"status <>"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThan
(
String
value
)
{
addCriterion
(
"status >"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"status >="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThan
(
String
value
)
{
addCriterion
(
"status <"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"status <="
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusLike
(
String
value
)
{
addCriterion
(
"status like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotLike
(
String
value
)
{
addCriterion
(
"status not like"
,
value
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusIn
(
List
<
String
>
values
)
{
addCriterion
(
"status in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"status not in"
,
values
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"status between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
public
Criteria
andStatusNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"status not between"
,
value1
,
value2
,
"status"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/domain/FucTestWithBLOBs.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.domain
;
import
java.io.Serializable
;
public
class
FucTestWithBLOBs
extends
FucTest
implements
Serializable
{
private
String
runtimeConfiguration
;
private
String
schedule
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getRuntimeConfiguration
()
{
return
runtimeConfiguration
;
}
public
void
setRuntimeConfiguration
(
String
runtimeConfiguration
)
{
this
.
runtimeConfiguration
=
runtimeConfiguration
==
null
?
null
:
runtimeConfiguration
.
trim
();
}
public
String
getSchedule
()
{
return
schedule
;
}
public
void
setSchedule
(
String
schedule
)
{
this
.
schedule
=
schedule
==
null
?
null
:
schedule
.
trim
();
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.mapper
;
import
io.metersphere.base.domain.FucTestFile
;
import
io.metersphere.base.domain.FucTestFileExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FucTestFileMapper
{
long
countByExample
(
FucTestFileExample
example
);
int
deleteByExample
(
FucTestFileExample
example
);
int
insert
(
FucTestFile
record
);
int
insertSelective
(
FucTestFile
record
);
List
<
FucTestFile
>
selectByExample
(
FucTestFileExample
example
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FucTestFile
record
,
@Param
(
"example"
)
FucTestFileExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FucTestFile
record
,
@Param
(
"example"
)
FucTestFileExample
example
);
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.metersphere.base.mapper.FucTestFileMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.metersphere.base.domain.FucTestFile"
>
<result
column=
"test_id"
jdbcType=
"VARCHAR"
property=
"testId"
/>
<result
column=
"file_id"
jdbcType=
"VARCHAR"
property=
"fileId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
test_id, file_id
</sql>
<select
id=
"selectByExample"
parameterType=
"io.metersphere.base.domain.FucTestFileExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from fuc_test_file
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteByExample"
parameterType=
"io.metersphere.base.domain.FucTestFileExample"
>
delete from fuc_test_file
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.metersphere.base.domain.FucTestFile"
>
insert into fuc_test_file (test_id, file_id)
values (#{testId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.metersphere.base.domain.FucTestFile"
>
insert into fuc_test_file
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"testId != null"
>
test_id,
</if>
<if
test=
"fileId != null"
>
file_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"testId != null"
>
#{testId,jdbcType=VARCHAR},
</if>
<if
test=
"fileId != null"
>
#{fileId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.metersphere.base.domain.FucTestFileExample"
resultType=
"java.lang.Long"
>
select count(*) from fuc_test_file
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update fuc_test_file
<set>
<if
test=
"record.testId != null"
>
test_id = #{record.testId,jdbcType=VARCHAR},
</if>
<if
test=
"record.fileId != null"
>
file_id = #{record.fileId,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update fuc_test_file
set test_id = #{record.testId,jdbcType=VARCHAR},
file_id = #{record.fileId,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.mapper
;
import
io.metersphere.base.domain.FucTest
;
import
io.metersphere.base.domain.FucTestExample
;
import
io.metersphere.base.domain.FucTestWithBLOBs
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FucTestMapper
{
long
countByExample
(
FucTestExample
example
);
int
deleteByExample
(
FucTestExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
FucTestWithBLOBs
record
);
int
insertSelective
(
FucTestWithBLOBs
record
);
List
<
FucTestWithBLOBs
>
selectByExampleWithBLOBs
(
FucTestExample
example
);
List
<
FucTest
>
selectByExample
(
FucTestExample
example
);
FucTestWithBLOBs
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FucTestWithBLOBs
record
,
@Param
(
"example"
)
FucTestExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
FucTestWithBLOBs
record
,
@Param
(
"example"
)
FucTestExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FucTest
record
,
@Param
(
"example"
)
FucTestExample
example
);
int
updateByPrimaryKeySelective
(
FucTestWithBLOBs
record
);
int
updateByPrimaryKeyWithBLOBs
(
FucTestWithBLOBs
record
);
int
updateByPrimaryKey
(
FucTest
record
);
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.metersphere.base.mapper.FucTestMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.metersphere.base.domain.FucTest"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"project_id"
jdbcType=
"VARCHAR"
property=
"projectId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.metersphere.base.domain.FucTestWithBLOBs"
>
<result
column=
"runtime_configuration"
jdbcType=
"LONGVARCHAR"
property=
"runtimeConfiguration"
/>
<result
column=
"schedule"
jdbcType=
"LONGVARCHAR"
property=
"schedule"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, project_id, name, description, create_time, update_time
</sql>
<sql
id=
"Blob_Column_List"
>
runtime_configuration, schedule
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"io.metersphere.base.domain.FucTestExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from fuc_test
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"io.metersphere.base.domain.FucTestExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from fuc_test
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from fuc_test
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from fuc_test
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.metersphere.base.domain.FucTestExample"
>
delete from fuc_test
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.metersphere.base.domain.FucTestWithBLOBs"
>
insert into fuc_test (id, project_id, name,
description, create_time, update_time,
runtime_configuration, schedule)
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{runtimeConfiguration,jdbcType=LONGVARCHAR}, #{schedule,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.metersphere.base.domain.FucTestWithBLOBs"
>
insert into fuc_test
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"projectId != null"
>
project_id,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"runtimeConfiguration != null"
>
runtime_configuration,
</if>
<if
test=
"schedule != null"
>
schedule,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"projectId != null"
>
#{projectId,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"runtimeConfiguration != null"
>
#{runtimeConfiguration,jdbcType=LONGVARCHAR},
</if>
<if
test=
"schedule != null"
>
#{schedule,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.metersphere.base.domain.FucTestExample"
resultType=
"java.lang.Long"
>
select count(*) from fuc_test
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update fuc_test
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.projectId != null"
>
project_id = #{record.projectId,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if
test=
"record.runtimeConfiguration != null"
>
runtime_configuration = #{record.runtimeConfiguration,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.schedule != null"
>
schedule = #{record.schedule,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update fuc_test
set id = #{record.id,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
runtime_configuration = #{record.runtimeConfiguration,jdbcType=LONGVARCHAR},
schedule = #{record.schedule,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update fuc_test
set id = #{record.id,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.metersphere.base.domain.FucTestWithBLOBs"
>
update fuc_test
<set>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"runtimeConfiguration != null"
>
runtime_configuration = #{runtimeConfiguration,jdbcType=LONGVARCHAR},
</if>
<if
test=
"schedule != null"
>
schedule = #{schedule,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"io.metersphere.base.domain.FucTestWithBLOBs"
>
update fuc_test
set project_id = #{projectId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
runtime_configuration = #{runtimeConfiguration,jdbcType=LONGVARCHAR},
schedule = #{schedule,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.metersphere.base.domain.FucTest"
>
update fuc_test
set project_id = #{projectId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.mapper
;
import
io.metersphere.base.domain.FucTestReport
;
import
io.metersphere.base.domain.FucTestReportExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FucTestReportMapper
{
long
countByExample
(
FucTestReportExample
example
);
int
deleteByExample
(
FucTestReportExample
example
);
int
deleteByPrimaryKey
(
String
id
);
int
insert
(
FucTestReport
record
);
int
insertSelective
(
FucTestReport
record
);
List
<
FucTestReport
>
selectByExampleWithBLOBs
(
FucTestReportExample
example
);
List
<
FucTestReport
>
selectByExample
(
FucTestReportExample
example
);
FucTestReport
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FucTestReport
record
,
@Param
(
"example"
)
FucTestReportExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
FucTestReport
record
,
@Param
(
"example"
)
FucTestReportExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FucTestReport
record
,
@Param
(
"example"
)
FucTestReportExample
example
);
int
updateByPrimaryKeySelective
(
FucTestReport
record
);
int
updateByPrimaryKeyWithBLOBs
(
FucTestReport
record
);
int
updateByPrimaryKey
(
FucTestReport
record
);
}
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.metersphere.base.mapper.FucTestReportMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.metersphere.base.domain.FucTestReport"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"test_id"
jdbcType=
"VARCHAR"
property=
"testId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"io.metersphere.base.domain.FucTestReport"
>
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, test_id, name, description, create_time, update_time, status
</sql>
<sql
id=
"Blob_Column_List"
>
content
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"io.metersphere.base.domain.FucTestReportExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from fuc_test_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"io.metersphere.base.domain.FucTestReportExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from fuc_test_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from fuc_test_report
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from fuc_test_report
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"io.metersphere.base.domain.FucTestReportExample"
>
delete from fuc_test_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"io.metersphere.base.domain.FucTestReport"
>
insert into fuc_test_report (id, test_id, name,
description, create_time, update_time,
status, content)
values (#{id,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{status,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"io.metersphere.base.domain.FucTestReport"
>
insert into fuc_test_report
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"testId != null"
>
test_id,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"content != null"
>
content,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"testId != null"
>
#{testId,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"io.metersphere.base.domain.FucTestReportExample"
resultType=
"java.lang.Long"
>
select count(*) from fuc_test_report
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update fuc_test_report
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.testId != null"
>
test_id = #{record.testId,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
name = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if
test=
"record.status != null"
>
status = #{record.status,jdbcType=VARCHAR},
</if>
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update fuc_test_report
set id = #{record.id,jdbcType=VARCHAR},
test_id = #{record.testId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
status = #{record.status,jdbcType=VARCHAR},
content = #{record.content,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update fuc_test_report
set id = #{record.id,jdbcType=VARCHAR},
test_id = #{record.testId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
status = #{record.status,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"io.metersphere.base.domain.FucTestReport"
>
update fuc_test_report
<set>
<if
test=
"testId != null"
>
test_id = #{testId,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=VARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"io.metersphere.base.domain.FucTestReport"
>
update fuc_test_report
set test_id = #{testId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
status = #{status,jdbcType=VARCHAR},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"io.metersphere.base.domain.FucTestReport"
>
update fuc_test_report
set test_id = #{testId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
status = #{status,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.mapper.ext
;
import
io.metersphere.controller.request.testplan.QueryTestPlanRequest
;
import
io.metersphere.dto.FunctionalTestDTO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
ExtFunctionalTestMapper
{
List
<
FunctionalTestDTO
>
list
(
@Param
(
"request"
)
QueryTestPlanRequest
params
);
}
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"io.metersphere.base.mapper.ext.ExtFunctionalTestMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.metersphere.dto.FunctionalTestDTO"
extends=
"io.metersphere.base.mapper.FucTestMapper.BaseResultMap"
>
<result
column=
"project_name"
property=
"projectName"
/>
</resultMap>
<select
id=
"list"
resultMap=
"BaseResultMap"
parameterType=
"io.metersphere.controller.request.testplan.QueryTestPlanRequest"
>
select fuc_test.*, project.name as project_name
from fuc_test
left join project on fuc_test.project_id = project.id
<where>
<if
test=
"request.name != null"
>
and fuc_test.name like CONCAT('%', #{request.name},'%')
</if>
<if
test=
"request.workspaceId != null"
>
AND project.workspace_id = #{request.workspaceId}
</if>
<if
test=
"request.projectId != null"
>
AND project.id = #{request.projectId}
</if>
<if
test=
"request.id != null"
>
AND fuc_test.id = #{request.id}
</if>
</where>
<if
test=
"request.recent"
>
order by fuc_test.update_time desc
</if>
</select>
</mapper>
\ No newline at end of file
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.base.mapper.ext
;
import
io.metersphere.controller.request.ReportRequest
;
import
io.metersphere.dto.FunctionalReportDTO
;
import
io.metersphere.dto.ReportDTO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
ExtFunctionalTestReportMapper
{
List
<
FunctionalReportDTO
>
getReportList
(
@Param
(
"reportRequest"
)
ReportRequest
request
);
FunctionalReportDTO
getReportTestAndProInfo
(
@Param
(
"id"
)
String
id
);
}
backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"io.metersphere.base.mapper.ext.ExtFunctionalTestReportMapper"
>
<select
id=
"getReportList"
resultType=
"io.metersphere.dto.FunctionalReportDTO"
>
select ltr.id, ltr.name, ltr.test_id as testId, ltr.description,
ltr.create_time as createTime, ltr.update_time as updateTime, ltr.status as status, lt.name as testName
from fuc_test_report ltr join fuc_test lt on ltr.test_id = lt.id
<where>
<if
test=
"reportRequest.name != null"
>
AND ltr.name like CONCAT('%', #{reportRequest.name},'%')
</if>
</where>
</select>
<select
id=
"getReportTestAndProInfo"
resultType=
"io.metersphere.dto.FunctionalReportDTO"
>
select ltr.id, ltr.name, ltr.test_id as testId, ltr.description,
ltr.create_time as createTime, ltr.update_time as updateTime, ltr.status as status, lt.name as testName,
p.id as projectId, p.name as projectName
from fuc_test_report ltr join fuc_test lt on ltr.test_id = lt.id join project p on lt.project_id = p.id
where ltr.id = #{id}
</select>
</mapper>
\ No newline at end of file
backend/src/main/java/io/metersphere/controller/FunctionalReportController.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.controller
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
io.metersphere.base.domain.FucTestReport
;
import
io.metersphere.commons.constants.RoleConstants
;
import
io.metersphere.commons.utils.PageUtils
;
import
io.metersphere.commons.utils.Pager
;
import
io.metersphere.controller.request.ReportRequest
;
import
io.metersphere.dto.FunctionalReportDTO
;
import
io.metersphere.service.FunctionalReportService
;
import
io.metersphere.user.SessionUtils
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresRoles
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"/functional/report"
)
public
class
FunctionalReportController
{
@Resource
private
FunctionalReportService
functionalReportService
;
@GetMapping
(
"/recent/{count}"
)
@RequiresRoles
(
value
=
{
RoleConstants
.
TEST_MANAGER
,
RoleConstants
.
TEST_USER
,
RoleConstants
.
TEST_VIEWER
},
logical
=
Logical
.
OR
)
public
List
<
FucTestReport
>
recentProjects
(
@PathVariable
int
count
)
{
String
currentWorkspaceId
=
SessionUtils
.
getCurrentWorkspaceId
();
ReportRequest
request
=
new
ReportRequest
();
request
.
setWorkspaceId
(
currentWorkspaceId
);
// 最近 `count` 个项目
PageHelper
.
startPage
(
1
,
count
);
return
functionalReportService
.
getRecentReportList
(
request
);
}
@PostMapping
(
"/list/all/{goPage}/{pageSize}"
)
public
Pager
<
List
<
FunctionalReportDTO
>>
getReportList
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
ReportRequest
request
)
{
Page
<
Object
>
page
=
PageHelper
.
startPage
(
goPage
,
pageSize
,
true
);
return
PageUtils
.
setPageInfo
(
page
,
functionalReportService
.
getReportList
(
request
));
}
@PostMapping
(
"/delete/{reportId}"
)
public
void
deleteReport
(
@PathVariable
String
reportId
)
{
functionalReportService
.
deleteReport
(
reportId
);
}
@GetMapping
(
"/test/pro/info/{reportId}"
)
public
FunctionalReportDTO
getReportTestAndProInfo
(
@PathVariable
String
reportId
)
{
return
functionalReportService
.
getReportTestAndProInfo
(
reportId
);
}
}
backend/src/main/java/io/metersphere/controller/FunctionalTestController.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.controller
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
io.metersphere.base.domain.FileMetadata
;
import
io.metersphere.commons.constants.RoleConstants
;
import
io.metersphere.commons.utils.PageUtils
;
import
io.metersphere.commons.utils.Pager
;
import
io.metersphere.controller.request.testplan.*
;
import
io.metersphere.dto.FunctionalTestDTO
;
import
io.metersphere.service.FileService
;
import
io.metersphere.service.FuctionalTestService
;
import
io.metersphere.user.SessionUtils
;
import
org.apache.shiro.authz.annotation.Logical
;
import
org.apache.shiro.authz.annotation.RequiresRoles
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"/functional/plan"
)
@RequiresRoles
(
value
=
{
RoleConstants
.
TEST_MANAGER
,
RoleConstants
.
TEST_USER
,
RoleConstants
.
TEST_VIEWER
},
logical
=
Logical
.
OR
)
public
class
FunctionalTestController
{
@Resource
private
FuctionalTestService
fuctionalTestService
;
@Resource
private
FileService
fileService
;
@GetMapping
(
"recent/{count}"
)
public
List
<
FunctionalTestDTO
>
recentTestPlans
(
@PathVariable
int
count
)
{
String
currentWorkspaceId
=
SessionUtils
.
getCurrentWorkspaceId
();
QueryTestPlanRequest
request
=
new
QueryTestPlanRequest
();
request
.
setWorkspaceId
(
currentWorkspaceId
);
PageHelper
.
startPage
(
1
,
count
,
true
);
return
fuctionalTestService
.
recentTestPlans
(
request
);
}
@PostMapping
(
"/list/{goPage}/{pageSize}"
)
public
Pager
<
List
<
FunctionalTestDTO
>>
list
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
QueryTestPlanRequest
request
)
{
Page
<
Object
>
page
=
PageHelper
.
startPage
(
goPage
,
pageSize
,
true
);
request
.
setWorkspaceId
(
SessionUtils
.
getCurrentWorkspaceId
());
return
PageUtils
.
setPageInfo
(
page
,
fuctionalTestService
.
list
(
request
));
}
@PostMapping
(
value
=
"/save"
,
consumes
=
{
"multipart/form-data"
})
public
String
save
(
@RequestPart
(
"request"
)
SaveTestPlanRequest
request
,
@RequestPart
(
value
=
"file"
)
MultipartFile
file
)
{
return
fuctionalTestService
.
save
(
request
,
file
);
}
@PostMapping
(
value
=
"/edit"
,
consumes
=
{
"multipart/form-data"
})
public
String
edit
(
@RequestPart
(
"request"
)
EditTestPlanRequest
request
,
@RequestPart
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
)
{
return
fuctionalTestService
.
edit
(
request
,
file
);
}
@GetMapping
(
"/get/{testId}"
)
public
FunctionalTestDTO
get
(
@PathVariable
String
testId
)
{
return
fuctionalTestService
.
get
(
testId
);
}
@GetMapping
(
"/get-runtime-config/{testId}"
)
public
String
getAdvancedConfiguration
(
@PathVariable
String
testId
)
{
return
fuctionalTestService
.
getRuntimeConfiguration
(
testId
);
}
@PostMapping
(
"/delete"
)
public
void
delete
(
@RequestBody
DeleteTestPlanRequest
request
)
{
fuctionalTestService
.
delete
(
request
);
}
@PostMapping
(
"/run"
)
public
void
run
(
@RequestBody
RunTestPlanRequest
request
)
{
fuctionalTestService
.
run
(
request
);
}
@GetMapping
(
"/file/metadata/{testId}"
)
public
FileMetadata
getFileMetadata
(
@PathVariable
String
testId
)
{
return
fileService
.
getFucFileMetadataByTestId
(
testId
);
}
@PostMapping
(
"/file/download"
)
public
ResponseEntity
<
byte
[]>
downloadJmx
(
@RequestBody
FileOperationRequest
fileOperationRequest
)
{
byte
[]
bytes
=
fileService
.
loadFileAsBytes
(
fileOperationRequest
.
getId
());
return
ResponseEntity
.
ok
()
.
contentType
(
MediaType
.
parseMediaType
(
"application/octet-stream"
))
.
header
(
HttpHeaders
.
CONTENT_DISPOSITION
,
"attachment; filename=\""
+
fileOperationRequest
.
getName
()
+
"\""
)
.
body
(
bytes
);
}
}
backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java
浏览文件 @
a950c03a
package
io.metersphere.controller.request.testplan
;
package
io.metersphere.controller.request.testplan
;
import
io.metersphere.base.domain.LoadTestWithBLOBs
;
public
class
TestPlanRequest
{
private
String
id
;
private
String
projectId
;
private
String
name
;
private
String
description
;
private
String
scenarioDefinition
;
private
Long
createTime
;
private
Long
updateTime
;
private
String
loadConfiguration
;
private
String
advancedConfiguration
;
private
String
runtimeConfiguration
;
private
String
schedule
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getScenarioDefinition
()
{
return
scenarioDefinition
;
}
public
void
setScenarioDefinition
(
String
scenarioDefinition
)
{
this
.
scenarioDefinition
=
scenarioDefinition
;
}
public
Long
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Long
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Long
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getRuntimeConfiguration
()
{
return
runtimeConfiguration
;
}
public
void
setRuntimeConfiguration
(
String
runtimeConfiguration
)
{
this
.
runtimeConfiguration
=
runtimeConfiguration
;
}
public
String
getLoadConfiguration
()
{
return
loadConfiguration
;
}
public
void
setLoadConfiguration
(
String
loadConfiguration
)
{
this
.
loadConfiguration
=
loadConfiguration
==
null
?
null
:
loadConfiguration
.
trim
();
}
public
String
getAdvancedConfiguration
()
{
return
advancedConfiguration
;
}
public
void
setAdvancedConfiguration
(
String
advancedConfiguration
)
{
this
.
advancedConfiguration
=
advancedConfiguration
==
null
?
null
:
advancedConfiguration
.
trim
();
}
public
String
getSchedule
()
{
return
schedule
;
}
public
void
setSchedule
(
String
schedule
)
{
this
.
schedule
=
schedule
==
null
?
null
:
schedule
.
trim
();
}
public
class
TestPlanRequest
extends
LoadTestWithBLOBs
{
}
}
backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.dto
;
public
class
FunctionalReportDTO
{
private
String
id
;
private
String
testId
;
private
String
name
;
private
String
description
;
private
Long
createTime
;
private
Long
updateTime
;
private
String
status
;
private
String
content
;
private
String
testName
;
private
String
projectId
;
private
String
projectName
;
public
String
getProjectId
()
{
return
projectId
;
}
public
void
setProjectId
(
String
projectId
)
{
this
.
projectId
=
projectId
;
}
public
String
getProjectName
()
{
return
projectName
;
}
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getTestId
()
{
return
testId
;
}
public
void
setTestId
(
String
testId
)
{
this
.
testId
=
testId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
Long
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Long
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Long
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Long
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getTestName
()
{
return
testName
;
}
public
void
setTestName
(
String
testName
)
{
this
.
testName
=
testName
;
}
}
backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.dto
;
import
io.metersphere.base.domain.LoadTest
;
public
class
FunctionalTestDTO
extends
LoadTest
{
private
String
projectName
;
public
String
getProjectName
()
{
return
projectName
;
}
public
void
setProjectName
(
String
projectName
)
{
this
.
projectName
=
projectName
;
}
}
backend/src/main/java/io/metersphere/service/FileService.java
浏览文件 @
a950c03a
...
@@ -3,6 +3,7 @@ package io.metersphere.service;
...
@@ -3,6 +3,7 @@ package io.metersphere.service;
import
io.metersphere.base.domain.*
;
import
io.metersphere.base.domain.*
;
import
io.metersphere.base.mapper.FileContentMapper
;
import
io.metersphere.base.mapper.FileContentMapper
;
import
io.metersphere.base.mapper.FileMetadataMapper
;
import
io.metersphere.base.mapper.FileMetadataMapper
;
import
io.metersphere.base.mapper.FucTestFileMapper
;
import
io.metersphere.base.mapper.LoadTestFileMapper
;
import
io.metersphere.base.mapper.LoadTestFileMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -18,6 +19,8 @@ public class FileService {
...
@@ -18,6 +19,8 @@ public class FileService {
@Resource
@Resource
private
LoadTestFileMapper
loadTestFileMapper
;
private
LoadTestFileMapper
loadTestFileMapper
;
@Resource
@Resource
private
FucTestFileMapper
fucTestFileMapper
;
@Resource
private
FileContentMapper
fileContentMapper
;
private
FileContentMapper
fileContentMapper
;
public
byte
[]
loadFileAsBytes
(
String
id
)
{
public
byte
[]
loadFileAsBytes
(
String
id
)
{
...
@@ -38,6 +41,17 @@ public class FileService {
...
@@ -38,6 +41,17 @@ public class FileService {
return
fileMetadataMapper
.
selectByPrimaryKey
(
loadTestFiles
.
get
(
0
).
getFileId
());
return
fileMetadataMapper
.
selectByPrimaryKey
(
loadTestFiles
.
get
(
0
).
getFileId
());
}
}
public
FileMetadata
getFucFileMetadataByTestId
(
String
testId
)
{
FucTestFileExample
fucTestFileExample
=
new
FucTestFileExample
();
fucTestFileExample
.
createCriteria
().
andTestIdEqualTo
(
testId
);
final
List
<
FucTestFile
>
loadTestFiles
=
fucTestFileMapper
.
selectByExample
(
fucTestFileExample
);
if
(
CollectionUtils
.
isEmpty
(
loadTestFiles
))
{
return
null
;
}
return
fileMetadataMapper
.
selectByPrimaryKey
(
loadTestFiles
.
get
(
0
).
getFileId
());
}
public
FileContent
getFileContent
(
String
fileId
)
{
public
FileContent
getFileContent
(
String
fileId
)
{
return
fileContentMapper
.
selectByPrimaryKey
(
fileId
);
return
fileContentMapper
.
selectByPrimaryKey
(
fileId
);
}
}
...
...
backend/src/main/java/io/metersphere/service/FuctionalTestService.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.service
;
import
io.metersphere.base.domain.*
;
import
io.metersphere.base.mapper.*
;
import
io.metersphere.base.mapper.ext.ExtFunctionalTestMapper
;
import
io.metersphere.commons.constants.EngineType
;
import
io.metersphere.commons.exception.MSException
;
import
io.metersphere.controller.request.testplan.*
;
import
io.metersphere.dto.FunctionalTestDTO
;
import
io.metersphere.engine.Engine
;
import
io.metersphere.engine.EngineFactory
;
import
io.metersphere.i18n.Translator
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.UUID
;
@Service
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
FuctionalTestService
{
@Resource
private
FucTestMapper
fucTestMapper
;
@Resource
private
ExtFunctionalTestMapper
extFucTestMapper
;
@Resource
private
ProjectMapper
projectMapper
;
@Resource
private
FileMetadataMapper
fileMetadataMapper
;
@Resource
private
FileContentMapper
fileContentMapper
;
@Resource
private
FucTestFileMapper
fucTestFileMapper
;
@Resource
private
FileService
fileService
;
public
List
<
FunctionalTestDTO
>
list
(
QueryTestPlanRequest
request
)
{
return
extFucTestMapper
.
list
(
request
);
}
public
void
delete
(
DeleteTestPlanRequest
request
)
{
fucTestMapper
.
deleteByPrimaryKey
(
request
.
getId
());
fileService
.
deleteFileByTestId
(
request
.
getId
());
}
public
String
save
(
SaveTestPlanRequest
request
,
MultipartFile
file
)
{
if
(
file
==
null
)
{
throw
new
IllegalArgumentException
(
"文件不能为空!"
);
}
final
FileMetadata
fileMetadata
=
saveFile
(
file
);
final
FucTestWithBLOBs
fucTest
=
saveFucTest
(
request
);
FucTestFile
fucTestFile
=
new
FucTestFile
();
fucTestFile
.
setTestId
(
fucTest
.
getId
());
fucTestFile
.
setFileId
(
fileMetadata
.
getId
());
fucTestFileMapper
.
insert
(
fucTestFile
);
return
fucTest
.
getId
();
}
private
FucTestWithBLOBs
saveFucTest
(
SaveTestPlanRequest
request
)
{
FucTestExample
example
=
new
FucTestExample
();
example
.
createCriteria
().
andNameEqualTo
(
request
.
getName
()).
andProjectIdEqualTo
(
request
.
getProjectId
());
if
(
fucTestMapper
.
countByExample
(
example
)
>
0
)
{
MSException
.
throwException
(
Translator
.
get
(
"function_test_already_exists"
));
}
final
FucTestWithBLOBs
fucTes
=
new
FucTestWithBLOBs
();
fucTes
.
setId
(
UUID
.
randomUUID
().
toString
());
fucTes
.
setName
(
request
.
getName
());
fucTes
.
setProjectId
(
request
.
getProjectId
());
fucTes
.
setCreateTime
(
System
.
currentTimeMillis
());
fucTes
.
setUpdateTime
(
System
.
currentTimeMillis
());
fucTes
.
setDescription
(
"todo"
);
fucTes
.
setRuntimeConfiguration
(
request
.
getRuntimeConfiguration
());
fucTestMapper
.
insert
(
fucTes
);
return
fucTes
;
}
private
FileMetadata
saveFile
(
MultipartFile
file
)
{
final
FileMetadata
fileMetadata
=
new
FileMetadata
();
fileMetadata
.
setId
(
UUID
.
randomUUID
().
toString
());
fileMetadata
.
setName
(
file
.
getOriginalFilename
());
fileMetadata
.
setSize
(
file
.
getSize
());
fileMetadata
.
setCreateTime
(
System
.
currentTimeMillis
());
fileMetadata
.
setUpdateTime
(
System
.
currentTimeMillis
());
fileMetadata
.
setType
(
EngineType
.
JMX
.
name
());
fileMetadataMapper
.
insert
(
fileMetadata
);
FileContent
fileContent
=
new
FileContent
();
fileContent
.
setFileId
(
fileMetadata
.
getId
());
try
{
fileContent
.
setFile
(
file
.
getBytes
());
}
catch
(
IOException
e
)
{
MSException
.
throwException
(
e
);
}
fileContentMapper
.
insert
(
fileContent
);
return
fileMetadata
;
}
public
String
edit
(
EditTestPlanRequest
request
,
MultipartFile
file
)
{
// 新选择了一个文件,删除原来的文件
if
(
file
!=
null
)
{
fileService
.
deleteFileByTestId
(
request
.
getId
());
final
FileMetadata
fileMetadata
=
saveFile
(
file
);
FucTestFile
fucTestFile
=
new
FucTestFile
();
fucTestFile
.
setTestId
(
request
.
getId
());
fucTestFile
.
setFileId
(
fileMetadata
.
getId
());
fucTestFileMapper
.
insert
(
fucTestFile
);
}
final
FucTestWithBLOBs
fucTest
=
fucTestMapper
.
selectByPrimaryKey
(
request
.
getId
());
if
(
fucTest
==
null
)
{
MSException
.
throwException
(
"无法编辑测试,未找到测试:"
+
request
.
getId
());
}
else
{
fucTest
.
setName
(
request
.
getName
());
fucTest
.
setProjectId
(
request
.
getProjectId
());
fucTest
.
setUpdateTime
(
System
.
currentTimeMillis
());
fucTest
.
setDescription
(
"todo"
);
fucTest
.
setRuntimeConfiguration
(
request
.
getRuntimeConfiguration
());
fucTestMapper
.
updateByPrimaryKeySelective
(
fucTest
);
}
return
request
.
getId
();
}
public
void
run
(
RunTestPlanRequest
request
)
{
final
FucTestWithBLOBs
fucTest
=
fucTestMapper
.
selectByPrimaryKey
(
request
.
getId
());
if
(
fucTest
==
null
)
{
MSException
.
throwException
(
"无法运行测试,未找到测试:"
+
request
.
getId
());
}
final
FileMetadata
fileMetadata
=
fileService
.
getFileMetadataByTestId
(
request
.
getId
());
if
(
fileMetadata
==
null
)
{
MSException
.
throwException
(
"无法运行测试,无法获取测试文件元信息,测试ID:"
+
request
.
getId
());
}
final
FileContent
fileContent
=
fileService
.
getFileContent
(
fileMetadata
.
getId
());
if
(
fileContent
==
null
)
{
MSException
.
throwException
(
"无法运行测试,无法获取测试文件内容,测试ID:"
+
request
.
getId
());
}
System
.
out
.
println
(
"开始运行:"
+
fucTest
.
getName
());
final
Engine
engine
=
EngineFactory
.
createEngine
(
fileMetadata
.
getType
());
if
(
engine
==
null
)
{
MSException
.
throwException
(
String
.
format
(
"无法运行测试,未识别测试文件类型,测试ID:%s,文件类型:%s"
,
request
.
getId
(),
fileMetadata
.
getType
()));
}
boolean
init
=
true
;
try
{
// init = engine.init(EngineFactory.createContext(fucTest, fileMetadata, fileContent));
}
catch
(
Exception
e
)
{
MSException
.
throwException
(
e
);
}
if
(!
init
)
{
MSException
.
throwException
(
String
.
format
(
"无法运行测试,初始化运行环境失败,测试ID:%s"
,
request
.
getId
()));
}
// engine.start();
/// todo:通过调用stop方法能够停止正在运行的engine,但是如果部署了多个backend实例,页面发送的停止请求如何定位到具体的engine
}
public
List
<
FunctionalTestDTO
>
recentTestPlans
(
QueryTestPlanRequest
request
)
{
// 查询最近的测试计划
request
.
setRecent
(
true
);
return
extFucTestMapper
.
list
(
request
);
}
public
FunctionalTestDTO
get
(
String
testId
)
{
QueryTestPlanRequest
request
=
new
QueryTestPlanRequest
();
request
.
setId
(
testId
);
List
<
FunctionalTestDTO
>
testDTOS
=
extFucTestMapper
.
list
(
request
);
if
(!
CollectionUtils
.
isEmpty
(
testDTOS
))
{
return
testDTOS
.
get
(
0
);
}
return
null
;
}
public
String
getRuntimeConfiguration
(
String
testId
)
{
FucTestWithBLOBs
fucTestWithBLOBs
=
fucTestMapper
.
selectByPrimaryKey
(
testId
);
return
Optional
.
ofNullable
(
fucTestWithBLOBs
).
orElse
(
new
FucTestWithBLOBs
()).
getRuntimeConfiguration
();
}
}
backend/src/main/java/io/metersphere/service/FunctionalReportService.java
0 → 100644
浏览文件 @
a950c03a
package
io.metersphere.service
;
import
io.metersphere.base.domain.FucTestReport
;
import
io.metersphere.base.domain.FucTestReportExample
;
import
io.metersphere.base.mapper.FucTestReportMapper
;
import
io.metersphere.base.mapper.ext.ExtFunctionalTestReportMapper
;
import
io.metersphere.controller.request.ReportRequest
;
import
io.metersphere.dto.FunctionalReportDTO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
class
FunctionalReportService
{
@Resource
private
FucTestReportMapper
fucTestReportMapper
;
@Resource
private
ExtFunctionalTestReportMapper
extFunctionalTestReportMapper
;
public
List
<
FucTestReport
>
getRecentReportList
(
ReportRequest
request
)
{
FucTestReportExample
example
=
new
FucTestReportExample
();
example
.
setOrderByClause
(
"update_time desc"
);
return
fucTestReportMapper
.
selectByExample
(
example
);
}
public
List
<
FunctionalReportDTO
>
getReportList
(
ReportRequest
request
)
{
return
extFunctionalTestReportMapper
.
getReportList
(
request
);
}
public
void
deleteReport
(
String
reportId
)
{
fucTestReportMapper
.
deleteByPrimaryKey
(
reportId
);
}
public
FunctionalReportDTO
getReportTestAndProInfo
(
String
reportId
)
{
return
extFunctionalTestReportMapper
.
getReportTestAndProInfo
(
reportId
);
}
}
backend/src/main/resources/db/migration/V4__init_funcional.sql
0 → 100644
浏览文件 @
a950c03a
CREATE
TABLE
IF
NOT
EXISTS
`fuc_test`
(
`id`
varchar
(
50
)
NOT
NULL
COMMENT
'Test ID'
,
`project_id`
varchar
(
50
)
NOT
NULL
COMMENT
'Project ID this test belongs to'
,
`name`
varchar
(
64
)
NOT
NULL
COMMENT
'Test name'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'Test description'
,
`runtime_configuration`
longtext
COMMENT
'Load configuration (JSON format)'
,
`schedule`
longtext
COMMENT
'Test schedule (cron list)'
,
`create_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Create timestamp'
,
`update_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Update timestamp'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_bin
;
CREATE
TABLE
IF
NOT
EXISTS
`fuc_test_file`
(
`test_id`
varchar
(
64
)
DEFAULT
NULL
,
`file_id`
varchar
(
64
)
DEFAULT
NULL
,
UNIQUE
KEY
`load_test_file_unique_key`
(
`test_id`
,
`file_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'功能测试和文件的关联表'
;
CREATE
TABLE
IF
NOT
EXISTS
`fuc_test_report`
(
`id`
varchar
(
50
)
NOT
NULL
COMMENT
'Test report ID'
,
`test_id`
varchar
(
50
)
NOT
NULL
COMMENT
'Test ID this test report belongs to'
,
`name`
varchar
(
64
)
NOT
NULL
COMMENT
'Test report name'
,
`description`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'Test report name'
,
`content`
longtext
,
`create_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Create timestamp'
,
`update_time`
bigint
(
13
)
NOT
NULL
COMMENT
'Update timestamp'
,
`status`
varchar
(
64
)
NOT
NULL
COMMENT
'Status of this test run'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_bin
;
frontend/src/assets/browser/chrome.svg
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="utf-8"?>
<svg
version=
"1.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"50px"
height=
"50px"
xmlns=
"http://www.w3.org/2000/svg"
>
<g
transform=
"matrix(1 0 0 1 -320 -47 )"
>
<path
d=
"M 14.2299107142857 2.46655518394649 C 17.6339285714286 0.859345968041619 21.1960565476191 0.0464511334076489 24.9162946428571 0.0278706800445949 C 29.3805803571429 -0.00929022668153534 33.5751488095238 1.10553697510219 37.5 3.37235228539576 C 41.8154761904762 5.86213303604608 45.0892857142857 9.31809736157562 47.3214285714286 13.7402452619844 L 26.6183035714286 12.6532887402453 C 23.6421130952381 12.4860646599777 20.9077380952381 13.1781865477518 18.4151785714286 14.7296544035674 C 15.922619047619 16.2811222593831 14.2020089285714 18.4132292827945 13.2533482142857 21.1259754738016 L 5.55245535714286 9.30880713489409 C 7.93340773809524 6.35451505016723 10.8258928571429 4.07376439985135 14.2299107142857 2.46655518394649 Z M 0 25 C 0 20.0390189520624 1.35788690476191 15.4775176514307 4.07366071428571 11.3154960981048 L 13.4765625 29.79375696767 C 14.8158482142857 32.4507617985879 16.7782738095238 34.4667409884801 19.3638392857143 35.8416945373467 C 21.9494047619048 37.2166480862133 24.6744791666667 37.6347082868822 27.5390625 37.0958751393534 L 21.1216517857143 49.6655518394649 C 17.1781994047619 49.0523968784838 13.5974702380952 47.5891861761427 10.3794642857143 45.2759197324415 C 7.16145833333333 42.9626532887402 4.62704613095238 40.0269416573764 2.77622767857143 36.4687848383501 C 0.925409226190476 32.9106280193237 0 29.0876997398737 0 25 Z M 34.2354910714286 16.7502787068004 L 48.3258928571429 16.025641025641 C 49.4047619047619 18.8127090301003 49.9581473214286 21.6973244147157 49.9860491071429 24.6794871794872 C 50.0139508928571 27.6616499442586 49.5628720238095 30.5044593088071 48.6328125 33.2079152731327 C 47.7027529761905 35.9113712374582 46.2797619047619 38.4383128948346 44.3638392857143 40.788740245262 C 42.4479166666667 43.1391675956893 40.1599702380952 45.0854700854701 37.5 46.6276477146042 C 33.2217261904762 49.0988480118915 28.5900297619048 50.2043849869937 23.6049107142857 49.9442586399108 L 34.9051339285714 32.5808249721293 C 36.5420386904762 30.1467855815682 37.3093377976191 27.4479747305834 37.20703125 24.484392419175 C 37.104724702381 21.5208101077666 36.1142113095238 18.9427722036418 34.2354910714286 16.7502787068004 Z M 19.04296875 19.0496098104794 C 20.6891741071429 17.4052396878484 22.6748511904762 16.5830546265329 25 16.5830546265329 C 27.3251488095238 16.5830546265329 29.3108258928571 17.4052396878484 30.95703125 19.0496098104794 C 32.6032366071429 20.6939799331104 33.4263392857143 22.6774433296172 33.4263392857143 25 C 33.4263392857143 27.3225566703828 32.6032366071429 29.3060200668896 30.95703125 30.9503901895206 C 29.3108258928571 32.5947603121516 27.3251488095238 33.4169453734671 25 33.4169453734671 C 22.6748511904762 33.4169453734671 20.6891741071429 32.5947603121516 19.04296875 30.9503901895206 C 17.3967633928571 29.3060200668896 16.5736607142857 27.3225566703828 16.5736607142857 25 C 16.5736607142857 22.6774433296172 17.3967633928571 20.6939799331104 19.04296875 19.0496098104794 Z "
fill-rule=
"nonzero"
fill=
"#000000"
stroke=
"none"
transform=
"matrix(1 0 0 1 320 47 )"
/>
</g>
</svg>
\ No newline at end of file
frontend/src/assets/browser/firefox.svg
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="utf-8"?>
<svg
version=
"1.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"50px"
height=
"50px"
xmlns=
"http://www.w3.org/2000/svg"
>
<g
transform=
"matrix(1 0 0 1 -420 -47 )"
>
<path
d=
"M 33.2264361405466 48.5751295336788 C 30.633017289459 49.5250431778929 27.9512920617215 50 25.1812604573341 50 C 19.9200594906116 50 15.2305261200967 48.5559393590482 11.1126603457892 45.6678180771445 C 6.99479457148169 42.7796967952408 3.93195761293921 38.956054500096 1.92414947016174 34.1968911917098 C 0.845882134225693 31.6829783151027 0.223089793641941 28.794857033199 0.0557724484104852 25.5325273459988 C -0.11154489682097 22.2701976587987 0.130135712957799 19.0798311264632 0.780814277746793 15.9614277489925 C 1.43149284253579 12.8430243715218 2.46328313812976 9.84935712914987 3.87618516452872 6.9804260218768 C 5.28908719092768 4.11149491460372 6.95296523517382 1.78468624064479 8.86781929726715 0 L 8.56107083100948 8.08865860679332 C 8.76556980851459 7.81999616196507 9.39765755716676 7.67127230857801 10.457334076966 7.64248704663212 C 11.5170105967652 7.61370178468624 12.1676891615542 7.7624256380733 12.409369771333 8.08865860679332 C 13.1901840490798 6.5342544617156 14.6820970440602 5.21013241220495 16.8851087562744 4.11629245826137 C 19.0881204684886 3.02245250431779 21.2678936605317 2.45634235271541 23.4244283324038 2.41796200345423 C 22.4205242610151 3.28151986183074 21.3097229968396 4.70639032815199 20.0920245398773 6.69257340241796 C 18.874326082915 8.67875647668393 18.3305447109128 10.2475532527346 18.4606804238706 11.3989637305699 C 18.9254508272913 11.5524851276147 19.5064138315672 11.6820188063711 20.2035694366983 11.7875647668394 C 20.9007250418293 11.8931107273076 21.4863357501394 11.9650738821723 21.9604015616286 12.0034542314335 C 22.4344673731177 12.0418345806947 23.0665551217698 12.0802149299559 23.8566648075851 12.118595279217 C 24.6467744934003 12.1569756284782 25.1161926008552 12.1857608904241 25.2649191299498 12.2049510650547 C 25.5437813720022 12.3009019382076 25.6320877486522 12.7374784110535 25.5298382598996 13.5146804835924 C 25.4275887711471 14.2918825561313 25.1440788250604 15.016311648436 24.6793084216397 15.6879677605066 C 24.5863543409556 15.8222989829207 24.4329801078267 15.9998080982537 24.2191857222532 16.2204951065055 C 24.0053913366797 16.4411821147572 23.4802007808143 16.7818077144502 22.643614054657 17.2423719055843 C 21.8070273284997 17.7029360967185 20.8681911135899 18.0291690654385 19.8271054099275 18.2210708117444 L 20.2453987730061 23.6614853195164 L 16.3692136084774 21.7328727691422 C 16.0345789180145 22.5580502782575 15.9648633575014 23.340049894454 16.1600669269381 24.0788716177317 C 16.3552704963748 24.8176933410094 16.6899051868377 25.4557666474765 17.1639709983268 25.993091537133 C 17.638036809816 26.5304164267895 18.2468860382971 26.9286125503742 18.9905186837702 27.1876799078872 C 19.7341513292434 27.4467472654001 20.4870793827849 27.5091153329495 21.2493028443949 27.3747841105354 C 22.1974344673731 27.2020725388601 23.1083844580777 26.8710420264824 23.9821528165086 26.3816925734024 C 24.8559211749396 25.8923431203224 25.6320877486522 25.4605641911341 26.3106525376464 25.0863557858377 C 26.9892173266406 24.7121473805412 27.6724298196691 24.5442333525235 28.3602900167317 24.5826137017847 C 29.4943298010783 24.659374400307 30.3262688232013 24.9760122817118 30.8561070831009 25.5325273459988 C 31.3859453430006 26.0890424102859 31.5672058003346 26.7127230857801 31.3998884551032 27.4035693724813 C 31.3812976389664 27.4419497217425 31.3580591187953 27.4947227019766 31.3301728945901 27.5618883131836 C 31.3022866703848 27.6290539243907 31.2232757018033 27.7489925158319 31.0931399888455 27.9217040875072 C 30.9630042758877 28.0944156591825 30.7956869306563 28.2431395125696 30.5911879531511 28.3678756476684 C 30.386688975646 28.4926117827672 30.093883621491 28.5933601995778 29.712771890686 28.6701208981002 C 29.331660159881 28.7468815966225 28.8994236846998 28.7564766839378 28.4160624651422 28.6989061600461 C 27.3006134969325 30.521972749952 25.9574270310467 31.8221070811744 24.3865030674847 32.5993091537133 C 22.8155791039227 33.3765112262522 20.8681911135899 33.6595663020533 18.5443390964863 33.4484743811169 C 19.9200594906116 34.6190750335828 21.4305633017289 35.4106697370946 23.0758505298383 35.8232584916523 C 24.7211377579476 36.2358472462099 26.2874140174754 36.2934177701017 27.7746793084216 35.9959700633276 C 29.2619445993679 35.6985223565534 30.6980851459379 35.1995778161581 32.0831009481316 34.4991364421416 C 33.4681167503253 33.7986950681251 34.6579289830824 32.9591249280368 35.6525376464027 31.9804260218768 C 36.647146309723 31.0017271157168 37.3954266592303 30.0038380349261 37.8973786949247 28.9867587795049 C 38.6967837888083 27.2404528881213 39.0593047034765 25.3933985799271 38.9849414389292 23.4455958549223 C 38.9105781743819 21.4977931299175 38.5620003718163 19.6891191709845 37.9392080312326 18.0195739781232 C 37.3164156906488 16.3500287852619 36.5867261572783 15.1506428708501 35.750139431121 14.4214162348877 C 37.3675404350251 15.1506428708501 38.6410113403978 15.913452312416 39.5705521472393 16.7098445595855 C 40.5000929540807 17.5062368067549 41.2158393753486 18.5856841297256 41.7177914110429 19.9481865284974 C 41.9966536530954 16.6858568412973 41.4621676891616 13.3947418921512 40.1143335192415 10.0748416810593 C 38.7664993493214 6.75494146996737 36.8191113589887 4.02993667242372 34.2721695482432 1.89982728842832 C 39.1987358245027 3.37747073498368 43.0284439486894 6.05929763960852 45.7612939208031 9.94530800230282 C 48.4941438929169 13.8313183649971 49.8977505112474 18.7967760506621 49.9721137757948 24.8416810592976 C 50.0092954080684 27.2788332373825 49.6328313812976 29.7255805027826 48.8427216954824 32.181922855498 C 48.0526120096672 34.6382652082134 46.9046291132181 36.9218959892535 45.398773006135 39.0328151986183 C 43.8929168990519 41.1437344079831 42.1360847741216 43.0243715217809 40.1282766313441 44.6747265400115 C 38.1204684885667 46.3250815582422 35.8198549916341 47.6252158894646 33.2264361405466 48.5751295336788 Z "
fill-rule=
"nonzero"
fill=
"#000000"
stroke=
"none"
transform=
"matrix(1 0 0 1 420 47 )"
/>
</g>
</svg>
\ No newline at end of file
frontend/src/assets/browser/ie.svg
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="utf-8"?>
<svg
version=
"1.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"50px"
height=
"50px"
xmlns=
"http://www.w3.org/2000/svg"
>
<g
transform=
"matrix(1 0 0 1 -520 -47 )"
>
<path
d=
"M 47.1819196428571 15.0852272727273 C 49.0606398809524 18.532196969697 50 22.2253787878788 50 26.1647727272727 C 50 27.2253787878788 49.9348958333333 28.2102272727273 49.8046875 29 L 17.6897321428571 29 C 17.6897321428571 31.8844696969697 18.7081473214286 34.1998106060606 20.7449776785714 36.0653409090909 C 22.7818080357143 37.9308712121212 25.1767113095238 38.8636363636364 27.9296875 38.8636363636364 C 29.7712053571429 38.8636363636364 31.4964657738095 38.4232954545455 33.10546875 37.5426136363636 C 34.7144717261905 36.6619318181818 35.9840029761905 35.4261363636364 36.9140625 33 L 48.7165178571429 33 C 47.6748511904762 36.8465909090909 46.089099702381 39.5075757575758 43.9592633928571 41.8181818181818 C 41.8294270833333 44.1287878787879 39.3415178571429 45.9138257575758 36.4955357142857 47.1732954545455 C 33.6495535714286 48.4327651515152 30.6640625 49.0625 27.5390625 49.0625 C 24.0606398809524 49.0625 20.7496279761905 48.2765151515152 17.6060267857143 46.7045454545455 C 13.3649553571429 48.9015151515152 9.70052083333333 50 6.61272321428571 50 C 2.20424107142857 50 0 47.5094696969697 0 42.5284090909091 C 0 40.3503787878788 0.418526785714286 37.7462121212121 1.25558035714286 34.7159090909091 C 1.5718005952381 33.5795454545455 2.58556547619048 31.4109848484848 4.296875 28.2102272727273 C 7.99851190476191 21.3920454545455 12.4162946428571 15.6534090909091 17.5502232142857 10.9943181818182 C 14.1276041666667 12.4905303030303 10.15625 15.842803030303 5.63616071428571 21.0511363636364 C 6.80803571428571 15.8617424242424 9.44475446428571 11.6051136363636 13.5463169642857 8.28125 C 17.6478794642857 4.95738636363636 22.3121279761905 3.29545454545455 27.5390625 3.29545454545455 C 28.0970982142857 3.29545454545455 28.515625 3.30492424242424 28.7946428571429 3.32386363636364 C 33.5379464285714 1.10795454545455 37.5651041666667 0 40.8761160714286 0 C 42.0665922619048 0 43.1454613095238 0.12310606060606 44.1127232142857 0.369318181818185 C 45.0799851190476 0.615530303030298 45.9588913690476 0.999053030303027 46.7494419642857 1.51988636363636 C 47.5399925595238 2.0407196969697 48.1584821428571 2.76515151515151 48.6049107142857 3.69318181818182 C 49.0513392857143 4.62121212121211 49.2745535714286 5.71022727272728 49.2745535714286 6.96022727272727 C 49.2745535714286 9.15719696969697 48.5770089285714 11.8655303030303 47.1819196428571 15.0852272727273 Z M 46.6238839285714 14.1193181818182 C 47.5725446428572 11.5625 48.046875 9.51704545454545 48.046875 7.98295454545455 C 48.046875 6.41098484848485 47.553943452381 5.16098484848485 46.5680803571429 4.23295454545455 C 45.5822172619048 3.30492424242424 44.3080357142857 2.84090909090909 42.7455357142857 2.84090909090909 C 40.7366071428571 2.84090909090909 38.374255952381 3.50378787878788 35.6584821428571 4.82954545454545 C 37.9092261904762 5.71969696969697 39.9786086309524 6.96496212121211 41.8666294642857 8.56534090909091 C 43.7546502976191 10.1657196969697 45.3404017857143 12.0170454545455 46.6238839285714 14.1193181818182 Z M 6.30580357142857 33.6931818181818 C 4.48288690476191 37.5757575757576 3.57142857142857 40.719696969697 3.57142857142857 43.125 C 3.57142857142857 44.7537878787879 4.02250744047619 46.0085227272727 4.92466517857143 46.8892045454545 C 5.82682291666667 47.7698863636364 7.07775297619048 48.2102272727273 8.67745535714286 48.2102272727273 C 10.8165922619048 48.2102272727273 13.2905505952381 47.4242424242424 16.0993303571429 45.8522727272727 C 13.8299851190476 44.4886363636364 11.8443080357143 42.7556818181818 10.1422991071429 40.6534090909091 C 8.44029017857143 38.5511363636364 7.16145833333333 36.2310606060606 6.30580357142857 33.6931818181818 Z M 20.7728794642857 16.1363636363636 C 18.7732514880952 17.9356060606061 17.7269345238095 20.1799242424242 17.6339285714286 23 L 37.9464285714286 23 C 37.8534226190476 20.1799242424242 36.8024553571429 17.9356060606061 34.7935267857143 16.1363636363636 C 32.7845982142857 14.3371212121212 30.4501488095238 13.4375 27.7901785714286 13.4375 C 25.1116071428571 13.4375 22.7725074404762 14.3371212121212 20.7728794642857 16.1363636363636 Z "
fill-rule=
"nonzero"
fill=
"#000000"
stroke=
"none"
transform=
"matrix(1 0 0 1 520 47 )"
/>
</g>
</svg>
\ No newline at end of file
frontend/src/assets/browser/opera.svg
0 → 100644
浏览文件 @
a950c03a
<?xml version="1.0" encoding="utf-8"?>
<svg
version=
"1.1"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"50px"
height=
"50px"
xmlns=
"http://www.w3.org/2000/svg"
>
<g
transform=
"matrix(1 0 0 1 -620 -47 )"
>
<path
d=
"M 34.0262276785714 1.68805803571428 C 36.8629092261905 2.79482886904762 39.4066220238095 4.35267857142857 41.6573660714286 6.36160714285715 C 38.5881696428571 4.31547619047619 35.249255952381 3.29241071428572 31.640625 3.29241071428572 C 28.7574404761905 3.29241071428572 26.0323660714286 3.97135416666666 23.4654017857143 5.32924107142857 C 20.8984375 6.68712797619047 18.6662946428571 8.54724702380952 16.7689732142857 10.9095982142857 C 15.3738839285714 12.6395089285714 14.262462797619 14.6670386904762 13.4347098214286 16.9921875 C 12.6069568452381 19.3173363095238 12.1558779761905 21.7912946428571 12.0814732142857 24.4140625 L 12.0814732142857 25.5859375 C 12.1558779761905 28.2087053571429 12.6069568452381 30.6826636904762 13.4347098214286 33.0078125 C 14.262462797619 35.3329613095238 15.3738839285714 37.3604910714286 16.7689732142857 39.0904017857143 C 18.6662946428571 41.4527529761905 20.8984375 43.3128720238095 23.4654017857143 44.6707589285714 C 26.0323660714286 46.0286458333333 28.7574404761905 46.7075892857143 31.640625 46.7075892857143 C 35.249255952381 46.7075892857143 38.5881696428571 45.6845238095238 41.6573660714286 43.6383928571429 C 39.4066220238095 45.6473214285714 36.8536086309524 47.2098214285714 33.9983258928571 48.3258928571429 C 31.1430431547619 49.4419642857143 28.1436011904762 50 25 50 C 24.4605654761905 50 24.0606398809524 49.9906994047619 23.8002232142857 49.9720982142857 C 20.5450148809524 49.8232886904762 17.4479166666667 49.0606398809524 14.5089285714286 47.6841517857143 C 11.5699404761905 46.3076636904762 9.04017857142857 44.5126488095238 6.91964285714286 42.2991071428571 C 4.79910714285714 40.0855654761905 3.1156994047619 37.4720982142857 1.86941964285714 34.4587053571429 C 0.623139880952381 31.4453125 0 28.2924107142857 0 25 C 0 21.6145833333333 0.660342261904762 18.3779761904762 1.98102678571429 15.2901785714286 C 3.30171130952381 12.2023809523809 5.078125 9.54241071428572 7.31026785714286 7.31026785714285 C 9.54241071428571 5.078125 12.202380952381 3.30171130952381 15.2901785714286 1.98102678571428 C 18.3779761904762 0.660342261904762 21.6145833333333 0 25 0 L 25.0837053571429 0 C 28.2087053571429 0.0186011904761862 31.1895461309524 0.581287202380948 34.0262276785714 1.68805803571428 Z M 47.8934151785714 14.9274553571429 C 49.2978050595238 18.0896577380952 50 21.4471726190476 50 25 C 50 28.5714285714286 49.2838541666667 31.9428943452381 47.8515625 35.1143973214286 C 46.4192708333333 38.285900297619 44.4382440476191 41.0435267857143 41.9084821428571 43.3872767857143 C 39.9739583333333 44.5591517857143 37.9092261904762 45.1450892857143 35.7142857142857 45.1450892857143 C 33.1659226190476 45.1450892857143 30.7942708333333 44.3638392857143 28.5993303571429 42.8013392857143 C 31.4639136904762 41.7596726190476 33.8216145833333 39.5926339285714 35.6724330357143 36.3002232142857 C 37.5232514880952 33.0078125 38.4486607142857 29.2410714285714 38.4486607142857 25 C 38.4486607142857 20.7775297619048 37.5279017857143 17.0200892857143 35.6863839285714 13.7276785714286 C 33.8448660714286 10.4352678571429 31.4918154761905 8.25892857142857 28.6272321428571 7.19866071428572 C 30.8407738095238 5.6547619047619 33.203125 4.8828125 35.7142857142857 4.8828125 C 37.9278273809524 4.8828125 40.0297619047619 5.48735119047619 42.0200892857143 6.69642857142857 C 44.53125 9.02157738095238 46.4890252976191 11.7652529761905 47.8934151785714 14.9274553571429 Z "
fill-rule=
"nonzero"
fill=
"#000000"
stroke=
"none"
transform=
"matrix(1 0 0 1 620 47 )"
/>
</g>
</svg>
\ No newline at end of file
frontend/src/business/components/common/router/router.js
浏览文件 @
a950c03a
...
@@ -23,6 +23,7 @@ import PerformanceTestHome from "../../performance/home/PerformanceTestHome";
...
@@ -23,6 +23,7 @@ import PerformanceTestHome from "../../performance/home/PerformanceTestHome";
import
FunctionalTestPlan
from
"
../../functional/plan/FunctionalTestPlan
"
;
import
FunctionalTestPlan
from
"
../../functional/plan/FunctionalTestPlan
"
;
import
FunctionalTestHome
from
"
../../functional/home/FunctionalTestHome
"
;
import
FunctionalTestHome
from
"
../../functional/home/FunctionalTestHome
"
;
import
PerformanceReportView
from
"
../../performance/report/PerformanceReportView
"
;
import
PerformanceReportView
from
"
../../performance/report/PerformanceReportView
"
;
import
FunctionalReportView
from
"
../../functional/report/FunctionalReportView
"
;
Vue
.
use
(
VueRouter
);
Vue
.
use
(
VueRouter
);
...
@@ -119,6 +120,11 @@ const router = new VueRouter({
...
@@ -119,6 +120,11 @@ const router = new VueRouter({
path
:
"
report/:type
"
,
path
:
"
report/:type
"
,
name
:
"
fucReport
"
,
name
:
"
fucReport
"
,
component
:
FunctionalTestReport
component
:
FunctionalTestReport
},
{
path
:
"
report/view/:reportId
"
,
name
:
"
fucReportView
"
,
component
:
FunctionalReportView
}
}
]
]
},
},
...
...
frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue
浏览文件 @
a950c03a
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<functional-test-scene-config
:test-plan=
"testPlan"
/>
<functional-test-scene-config
:test-plan=
"testPlan"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"$t('load_test.runtime_config')"
>
<el-tab-pane
:label=
"$t('load_test.runtime_config')"
>
<functional-test-runtime-config
:test-plan=
"testPlan"
/>
<functional-test-runtime-config
:test-plan=
"testPlan"
ref=
"runtimeConfig"
/>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</el-card>
</el-card>
...
@@ -48,23 +48,19 @@
...
@@ -48,23 +48,19 @@
result
:
{},
result
:
{},
testPlan
:
{},
testPlan
:
{},
listProjectPath
:
"
/project/listAll
"
,
listProjectPath
:
"
/project/listAll
"
,
savePath
:
"
/
test
plan/save
"
,
savePath
:
"
/
functional/
plan/save
"
,
editPath
:
"
/
test
plan/edit
"
,
editPath
:
"
/
functional/
plan/edit
"
,
runPath
:
"
/
test
plan/run
"
,
runPath
:
"
/
functional/
plan/run
"
,
projects
:
[],
projects
:
[],
active
:
'
0
'
,
active
:
'
0
'
,
tabs
:
[{
tabs
:
[{
title
:
this
.
$t
(
'
load_test.basic_config
'
),
title
:
this
.
$t
(
'
load_test.basic_config
'
),
id
:
'
0
'
,
id
:
'
0
'
,
component
:
'
Basic
Config
'
component
:
'
FunctionalTestScene
Config
'
},
{
},
{
title
:
this
.
$t
(
'
load_test.
pressur
e_config
'
),
title
:
this
.
$t
(
'
load_test.
runtim
e_config
'
),
id
:
'
1
'
,
id
:
'
1
'
,
component
:
'
PressureConfig
'
component
:
'
FunctionalTestRuntimeConfig
'
},
{
title
:
this
.
$t
(
'
load_test.advanced_config
'
),
id
:
'
2
'
,
component
:
'
AdvancedConfig
'
}]
}]
}
}
},
},
...
@@ -77,7 +73,7 @@
...
@@ -77,7 +73,7 @@
}
}
let
testId
=
to
.
path
.
split
(
'
/
'
)[
4
];
// find testId
let
testId
=
to
.
path
.
split
(
'
/
'
)[
4
];
// find testId
if
(
testId
)
{
if
(
testId
)
{
this
.
$get
(
'
/
test
plan/get/
'
+
testId
,
response
=>
{
this
.
$get
(
'
/
functional/
plan/get/
'
+
testId
,
response
=>
{
this
.
testPlan
=
response
.
data
;
this
.
testPlan
=
response
.
data
;
});
});
}
}
...
@@ -87,7 +83,7 @@
...
@@ -87,7 +83,7 @@
created
()
{
created
()
{
let
testId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
let
testId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
if
(
testId
)
{
if
(
testId
)
{
this
.
$get
(
'
/
test
plan/get/
'
+
testId
,
response
=>
{
this
.
$get
(
'
/
functional/
plan/get/
'
+
testId
,
response
=>
{
this
.
testPlan
=
response
.
data
;
this
.
testPlan
=
response
.
data
;
});
});
}
}
...
@@ -112,8 +108,8 @@
...
@@ -112,8 +108,8 @@
message
:
this
.
$t
(
'
commons.save_success
'
),
message
:
this
.
$t
(
'
commons.save_success
'
),
type
:
'
success
'
type
:
'
success
'
});
});
this
.
$refs
.
advanced
Config
.
cancelAllEdit
();
this
.
$refs
.
runtime
Config
.
cancelAllEdit
();
this
.
$router
.
push
({
path
:
'
/
loadtest
/all
'
})
this
.
$router
.
push
({
path
:
'
/
functional/plan
/all
'
})
});
});
},
},
saveAndRun
()
{
saveAndRun
()
{
...
@@ -145,10 +141,8 @@
...
@@ -145,10 +141,8 @@
if
(
!
this
.
testPlan
.
file
.
id
)
{
if
(
!
this
.
testPlan
.
file
.
id
)
{
formData
.
append
(
"
file
"
,
this
.
testPlan
.
file
);
formData
.
append
(
"
file
"
,
this
.
testPlan
.
file
);
}
}
// 压力配置
this
.
testPlan
.
loadConfiguration
=
JSON
.
stringify
(
this
.
$refs
.
pressureConfig
.
convertProperty
());
this
.
testPlan
.
runtimeConfiguration
=
JSON
.
stringify
(
this
.
$refs
.
runtimeConfig
.
configurations
());
// 高级配置
this
.
testPlan
.
advancedConfiguration
=
JSON
.
stringify
(
this
.
$refs
.
advancedConfig
.
configurations
());
// file属性不需要json化
// file属性不需要json化
let
requestJson
=
JSON
.
stringify
(
this
.
testPlan
,
function
(
key
,
value
)
{
let
requestJson
=
JSON
.
stringify
(
this
.
testPlan
,
function
(
key
,
value
)
{
...
@@ -169,7 +163,7 @@
...
@@ -169,7 +163,7 @@
};
};
},
},
cancel
()
{
cancel
()
{
this
.
$router
.
push
({
path
:
'
/
'
})
this
.
$router
.
push
({
path
:
'
/
functional/plan/all
'
})
},
},
validTestPlan
()
{
validTestPlan
()
{
if
(
!
this
.
testPlan
.
name
)
{
if
(
!
this
.
testPlan
.
name
)
{
...
@@ -199,7 +193,7 @@
...
@@ -199,7 +193,7 @@
return
false
;
return
false
;
}
}
if
(
!
this
.
$refs
.
advanced
Config
.
validConfig
())
{
if
(
!
this
.
$refs
.
runtime
Config
.
validConfig
())
{
return
false
;
return
false
;
}
}
...
...
frontend/src/business/components/functional/plan/FunctionalTestPlan.vue
浏览文件 @
a950c03a
...
@@ -81,8 +81,8 @@
...
@@ -81,8 +81,8 @@
data
()
{
data
()
{
return
{
return
{
result
:
{},
result
:
{},
queryPath
:
"
/
test
plan/list
"
,
queryPath
:
"
/
functional/
plan/list
"
,
deletePath
:
"
/
test
plan/delete
"
,
deletePath
:
"
/
functional/
plan/delete
"
,
condition
:
""
,
condition
:
""
,
projectId
:
null
,
projectId
:
null
,
tableData
:
[],
tableData
:
[],
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
},
},
handleEdit
(
testPlan
)
{
handleEdit
(
testPlan
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/
performance
/plan/edit/
'
+
testPlan
.
id
,
path
:
'
/
functional
/plan/edit/
'
+
testPlan
.
id
,
})
})
},
},
handleDelete
(
testPlan
)
{
handleDelete
(
testPlan
)
{
...
...
frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue
浏览文件 @
a950c03a
<
template
>
<
template
>
<div>
<div>
<el-row>
<el-col
:span=
"5"
:offset=
"6"
>
<span>
浏览器
</span>
</el-col>
</el-row>
<el-row
>
<el-col
:span=
"20"
:offset=
"2"
>
<el-radio-group
v-model=
"browser.value"
class=
"browser-radio"
>
<el-radio
v-for=
"item in browser.options"
:key=
"item.label"
:label=
"item.label"
>
<img
:src=
"item.url"
/>
</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"5"
:offset=
"6"
>
<span>
资源池
</span>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"18"
:offset=
"1"
>
<el-select
v-model=
"resourcePool.value"
filterable
placeholder=
"请选择"
>
<el-option
v-for=
"item in resourcePool.options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-col>
</el-row>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
"
FunctionalTestRuntimeConfig
"
name
:
"
FunctionalTestRuntimeConfig
"
,
data
()
{
return
{
resourcePool
:
{
options
:
[
{
value
:
'
选项1
'
,
label
:
'
资源池1
'
},
{
value
:
'
选项2
'
,
label
:
'
资源池3
'
},
{
value
:
'
选项3
'
,
label
:
'
资源池3
'
}],
value
:
''
},
browser
:
{
options
:
[{
url
:
require
(
'
@/assets/browser/firefox.svg
'
),
label
:
'
firefox
'
,
},
{
url
:
require
(
'
@/assets/browser/chrome.svg
'
),
label
:
'
chrome
'
,
},
{
url
:
require
(
'
@/assets/browser/ie.svg
'
),
label
:
'
ie
'
,
},
{
url
:
require
(
'
@/assets/browser/opera.svg
'
),
label
:
'
opera
'
,
}
],
value
:
'
firefox
'
}
}
},
methods
:
{
validConfig
()
{
if
(
this
.
resourcePool
.
value
==
''
)
{
this
.
$message
.
error
(
this
.
$t
(
'
fuc_test.select_resource_pool
'
));
return
false
;
}
return
true
;
},
configurations
()
{
return
{
resourcePool
:
this
.
resourcePool
,
browser
:
this
.
browser
}
},
cancelAllEdit
()
{
this
.
browser
.
value
=
'
firefox
'
;
this
.
resourcePool
.
value
=
''
;
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.el-row
{
margin-top
:
30px
;
margin-bottom
:
30px
;
}
span
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
dimgray
;
}
</
style
>
</
style
>
frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue
浏览文件 @
a950c03a
<
template
>
<
template
>
<div
v-loading=
"result.loading"
>
<el-upload
accept=
".jmx"
drag
action=
""
:limit=
"1"
:show-file-list=
"false"
:before-upload=
"beforeUpload"
:http-request=
"handleUpload"
:on-exceed=
"handleExceed"
:file-list=
"fileList"
>
<i
class=
"el-icon-upload"
/>
<div
class=
"el-upload__text"
v-html=
"$t('load_test.upload_tips')"
></div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
{{
$t
(
'
load_test.upload_type
'
)
}}
</div>
</el-upload>
<div>
<el-table
class=
"basic-config"
:data=
"tableData"
>
<el-table-column
prop=
"name"
:label=
"$t('load_test.file_name')"
>
</el-table-column>
<el-table-column
prop=
"size"
:label=
"$t('load_test.file_size')"
>
</el-table-column>
<el-table-column
prop=
"type"
:label=
"$t('load_test.file_type')"
>
</el-table-column>
<el-table-column
:label=
"$t('load_test.last_modify_time')"
>
<template
slot-scope=
"scope"
>
<i
class=
"el-icon-time"
/>
<span
class=
"last-modified"
>
{{
scope
.
row
.
lastModified
|
timestampFormatDate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"status"
:label=
"$t('load_test.file_status')"
>
</el-table-column>
<el-table-column
:label=
"$t('commons.operating')"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"handleDownload(scope.row)"
:disabled=
"!scope.row.id"
type=
"primary"
icon=
"el-icon-download"
size=
"mini"
circle
/>
<el-button
@
click=
"handleDelete(scope.row, scope.$index)"
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
circle
/>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
export
default
{
import
{
Message
}
from
"
element-ui
"
;
name
:
"
FunctionalTestSceneConfig
"
}
export
default
{
name
:
"
FunctionalTestSceneConfig
"
,
props
:
[
"
testPlan
"
],
data
()
{
return
{
result
:
{},
getFileMetadataPath
:
"
/functional/plan/file/metadata
"
,
jmxDownloadPath
:
'
/functional/plan/file/download
'
,
jmxDeletePath
:
'
/functional/plan/file/delete
'
,
fileList
:
[],
tableData
:
[],
};
},
created
()
{
if
(
this
.
testPlan
.
id
)
{
this
.
getFileMetadata
(
this
.
testPlan
)
}
},
watch
:
{
testPlan
()
{
if
(
this
.
testPlan
.
id
)
{
this
.
getFileMetadata
(
this
.
testPlan
)
}
}
},
methods
:
{
getFileMetadata
(
testPlan
)
{
this
.
fileList
=
[];
// 一个测试只有一个文件
this
.
tableData
=
[];
// 一个测试只有一个文件
this
.
result
=
this
.
$get
(
this
.
getFileMetadataPath
+
"
/
"
+
testPlan
.
id
,
response
=>
{
let
file
=
response
.
data
;
if
(
!
file
)
{
Message
.
error
({
message
:
this
.
$t
(
'
load_test.related_file_not_found
'
),
showClose
:
true
});
return
;
}
this
.
testPlan
.
file
=
file
;
this
.
fileList
.
push
({
id
:
file
.
id
,
name
:
file
.
name
});
this
.
tableData
.
push
({
id
:
file
.
id
,
name
:
file
.
name
,
size
:
file
.
size
+
'
Byte
'
,
/// todo: 按照大小显示Byte、KB、MB等
type
:
'
JMX
'
,
lastModified
:
file
.
updateTime
,
status
:
'
todo
'
,
});
})
},
beforeUpload
(
file
)
{
if
(
!
this
.
fileValidator
(
file
))
{
/// todo: 显示错误信息
return
false
;
}
this
.
tableData
.
push
({
name
:
file
.
name
,
size
:
file
.
size
+
'
Byte
'
,
/// todo: 按照大小显示Byte、KB、MB等
type
:
'
JMX
'
,
lastModified
:
file
.
lastModified
,
status
:
'
todo
'
,
});
return
true
;
},
handleUpload
(
uploadResources
)
{
this
.
testPlan
.
file
=
uploadResources
.
file
;
},
handleDownload
(
file
)
{
let
data
=
{
name
:
file
.
name
,
id
:
file
.
id
,
};
let
config
=
{
url
:
this
.
jmxDownloadPath
,
method
:
'
post
'
,
data
:
data
,
responseType
:
'
blob
'
};
this
.
result
=
this
.
$request
(
config
).
then
(
response
=>
{
const
content
=
response
.
data
;
const
blob
=
new
Blob
([
content
]);
if
(
"
download
"
in
document
.
createElement
(
"
a
"
))
{
// 非IE下载
// chrome/firefox
let
aTag
=
document
.
createElement
(
'
a
'
);
aTag
.
download
=
file
.
name
;
aTag
.
href
=
URL
.
createObjectURL
(
blob
);
aTag
.
click
();
URL
.
revokeObjectURL
(
aTag
.
href
)
}
else
{
// IE10+下载
navigator
.
msSaveBlob
(
blob
,
this
.
filename
)
}
}).
catch
(
e
=>
{
Message
.
error
({
message
:
e
.
message
,
showClose
:
true
});
});
},
handleDelete
(
file
,
index
)
{
this
.
$alert
(
this
.
$t
(
'
commons.delete_file_confirm
'
)
+
file
.
name
+
"
?
"
,
''
,
{
confirmButtonText
:
this
.
$t
(
'
commons.confirm
'
),
callback
:
(
action
)
=>
{
if
(
action
===
'
confirm
'
)
{
this
.
_handleDelete
(
file
,
index
);
}
}
});
},
_handleDelete
(
file
,
index
)
{
this
.
fileList
.
splice
(
index
,
1
);
this
.
tableData
.
splice
(
index
,
1
);
this
.
testPlan
.
file
=
null
;
},
handleExceed
()
{
this
.
$message
.
error
(
this
.
$t
(
'
load_test.delete_file
'
));
},
fileValidator
(
file
)
{
/// todo: 是否需要对文件内容和大小做限制
return
file
.
size
>
0
;
},
},
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.basic-config
{
width
:
100%
}
.last-modified
{
margin-left
:
5px
;
}
</
style
>
</
style
>
frontend/src/business/components/functional/report/FunctionalRecentReport.vue
浏览文件 @
a950c03a
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
import
{
ROLE_TEST_MANAGER
,
ROLE_TEST_USER
,
ROLE_TEST_VIEWER
}
from
"
../../../../common/constants
"
;
import
{
ROLE_TEST_MANAGER
,
ROLE_TEST_USER
,
ROLE_TEST_VIEWER
}
from
"
../../../../common/constants
"
;
export
default
{
export
default
{
name
:
"
Performance
RecentReport
"
,
name
:
"
Functional
RecentReport
"
,
mounted
()
{
mounted
()
{
const
rolesString
=
localStorage
.
getItem
(
"
roles
"
);
const
rolesString
=
localStorage
.
getItem
(
"
roles
"
);
const
roles
=
rolesString
.
split
(
'
,
'
);
const
roles
=
rolesString
.
split
(
'
,
'
);
if
(
roles
.
indexOf
(
ROLE_TEST_MANAGER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_USER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_VIEWER
)
>
-
1
)
{
if
(
roles
.
indexOf
(
ROLE_TEST_MANAGER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_USER
)
>
-
1
||
roles
.
indexOf
(
ROLE_TEST_VIEWER
)
>
-
1
)
{
this
.
$get
(
'
/report/recent/5
'
,
(
response
)
=>
{
this
.
$get
(
'
/
functional/
report/recent/5
'
,
(
response
)
=>
{
this
.
recentReports
=
response
.
data
;
this
.
recentReports
=
response
.
data
;
});
});
}
}
...
...
frontend/src/business/components/functional/report/FunctionalReportView.vue
0 → 100644
浏览文件 @
a950c03a
<
template
>
<div
v-loading=
"result.loading"
class=
"report-view-container"
>
<div
class=
"main-content"
>
<el-card>
<el-row>
<el-col
:span=
"16"
>
<el-row>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
:to=
"
{ path: '/' }">
{{
projectName
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
testName
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
reportName
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-row>
<el-row
class=
"ms-report-view-btns"
>
<el-button
type=
"primary"
plain
size=
"mini"
>
立即停止
</el-button>
<el-button
type=
"success"
plain
size=
"mini"
>
再次执行
</el-button>
<el-button
type=
"info"
plain
size=
"mini"
>
导出
</el-button>
<el-button
type=
"warning"
plain
size=
"mini"
>
比较
</el-button>
</el-row>
</el-col>
<el-col
:span=
"8"
>
<span
class=
"ms-report-time-desc"
>
持续时间: 30 分钟
</span>
<span
class=
"ms-report-time-desc"
>
开始时间: 2020-3-10 12:00:00
</span>
<span
class=
"ms-report-time-desc"
>
结束时间: 2020-3-10 12:30:00
</span>
</el-col>
</el-row>
<el-divider></el-divider>
<el-tabs
v-model=
"active"
type=
"border-card"
:stretch=
"true"
>
<el-tab-pane
:label=
"$t('report.test_log_details')"
>
<ms-report-log-details
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</div>
</
template
>
<
script
>
import
MsReportLogDetails
from
'
./components/LogDetails
'
;
export
default
{
name
:
"
FunctionalReportView
"
,
components
:
{
MsReportLogDetails
},
data
()
{
return
{
result
:
{},
active
:
'
0
'
,
reportId
:
''
,
reportName
:
''
,
testName
:
''
,
projectName
:
''
}
},
methods
:
{
initBreadcrumb
()
{
if
(
this
.
reportId
){
this
.
result
=
this
.
$get
(
"
/functional/report/test/pro/info/
"
+
this
.
reportId
,
res
=>
{
let
data
=
res
.
data
;
if
(
data
){
this
.
reportName
=
data
.
name
;
this
.
testName
=
data
.
testName
;
this
.
projectName
=
data
.
projectName
;
}
})
}
}
},
created
()
{
this
.
reportId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
this
.
initBreadcrumb
();
},
watch
:
{
'
$route
'
(
to
)
{
let
reportId
=
to
.
path
.
split
(
'
/
'
)[
4
];
if
(
reportId
){
this
.
$get
(
"
/functional/report/test/pro/info/
"
+
reportId
,
response
=>
{
let
data
=
response
.
data
;
if
(
data
){
this
.
reportName
=
data
.
name
;
this
.
testName
=
data
.
testName
;
this
.
projectName
=
data
.
projectName
;
}
});
}
}
}
}
</
script
>
<
style
scoped
>
.report-view-container
{
float
:
none
;
text-align
:
center
;
padding
:
15px
;
width
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
}
.report-view-container
.main-content
{
margin
:
0
auto
;
width
:
100%
;
max-width
:
1200px
;
}
.ms-report-view-btns
{
margin-top
:
15px
;
}
.ms-report-time-desc
{
text-align
:
left
;
display
:
block
;
color
:
#5C7878
;
}
</
style
>
frontend/src/business/components/functional/report/FunctionalTestReport.vue
浏览文件 @
a950c03a
...
@@ -88,8 +88,8 @@
...
@@ -88,8 +88,8 @@
data
()
{
data
()
{
return
{
return
{
result
:
{},
result
:
{},
queryPath
:
"
/report/list/all
"
,
queryPath
:
"
/
functional/
report/list/all
"
,
deletePath
:
"
/report/delete/
"
,
deletePath
:
"
/
functional/
report/delete/
"
,
condition
:
""
,
condition
:
""
,
projectId
:
null
,
projectId
:
null
,
tableData
:
[],
tableData
:
[],
...
...
frontend/src/business/components/functional/report/components/LogDetails.vue
0 → 100644
浏览文件 @
a950c03a
<
template
>
<div>
LogDetails
</div>
</
template
>
<
script
>
export
default
{
name
:
"
LogDetails
"
}
</
script
>
<
style
scoped
>
</
style
>
frontend/src/i18n/en-US.js
浏览文件 @
a950c03a
...
@@ -158,6 +158,9 @@ export default {
...
@@ -158,6 +158,9 @@ export default {
'
separated_by_commas
'
:
'
Separated by commas
'
,
'
separated_by_commas
'
:
'
Separated by commas
'
,
'
create
'
:
'
Create Test
'
,
'
create
'
:
'
Create Test
'
,
},
},
fuc_test
:
{
'
select_resource_pool
'
:
'
Please select resource pool
'
,
},
i18n
:
{
i18n
:
{
'
home
'
:
'
Home
'
,
'
home
'
:
'
Home
'
,
}
}
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
a950c03a
...
@@ -158,6 +158,9 @@ export default {
...
@@ -158,6 +158,9 @@ export default {
'
separated_by_commas
'
:
'
按逗号分隔
'
,
'
separated_by_commas
'
:
'
按逗号分隔
'
,
'
create
'
:
'
创建测试
'
,
'
create
'
:
'
创建测试
'
,
},
},
fuc_test
:
{
'
select_resource_pool
'
:
'
请选择资源池
'
,
},
i18n
:
{
i18n
:
{
'
home
'
:
'
首页
'
,
'
home
'
:
'
首页
'
,
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录