Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
147fba84
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,发现更多精彩内容 >>
提交
147fba84
编写于
3月 18, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能测试测试报告同步和展示
上级
96a1b0b9
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
854 addition
and
38 deletion
+854
-38
backend/src/main/java/io/metersphere/base/domain/FucTestLog.java
.../src/main/java/io/metersphere/base/domain/FucTestLog.java
+23
-0
backend/src/main/java/io/metersphere/base/domain/ZaleniumTest.java
...rc/main/java/io/metersphere/base/domain/ZaleniumTest.java
+4
-0
backend/src/main/java/io/metersphere/config/ProxyServletConfiguration.java
...java/io/metersphere/config/ProxyServletConfiguration.java
+21
-0
backend/src/main/java/io/metersphere/config/RestTemplateConfig.java
...c/main/java/io/metersphere/config/RestTemplateConfig.java
+4
-0
backend/src/main/java/io/metersphere/job/ZaleniumJob.java
backend/src/main/java/io/metersphere/job/ZaleniumJob.java
+4
-0
backend/src/main/java/io/metersphere/proxy/ProxyServlet.java
backend/src/main/java/io/metersphere/proxy/ProxyServlet.java
+680
-0
backend/src/main/java/io/metersphere/service/ZaleniumService.java
...src/main/java/io/metersphere/service/ZaleniumService.java
+4
-0
backend/src/test/java/io/metersphere/ZaleniumTest.java
backend/src/test/java/io/metersphere/ZaleniumTest.java
+4
-0
frontend/package.json
frontend/package.json
+2
-1
frontend/src/business/components/functional/report/FunctionalReportView.vue
...ess/components/functional/report/FunctionalReportView.vue
+29
-29
frontend/src/business/components/functional/report/FunctionalTestReport.vue
...ess/components/functional/report/FunctionalTestReport.vue
+1
-1
frontend/src/business/components/functional/report/components/LogDetails.vue
...ss/components/functional/report/components/LogDetails.vue
+44
-2
frontend/src/business/components/functional/report/components/ResultDetails.vue
...components/functional/report/components/ResultDetails.vue
+27
-0
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+4
-3
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+3
-2
未找到文件。
backend/src/main/java/io/metersphere/base/domain/FucTestLog.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.base.domain
;
public
class
FucLog
{
private
String
seleniumLog
;
private
String
browserDriverLog
;
public
String
getSeleniumLog
()
{
return
seleniumLog
;
}
public
void
setSeleniumLog
(
String
seleniumLog
)
{
this
.
seleniumLog
=
seleniumLog
;
}
public
String
getBrowserDriverLog
()
{
return
browserDriverLog
;
}
public
void
setBrowserDriverLog
(
String
browserDriverLog
)
{
this
.
browserDriverLog
=
browserDriverLog
;
}
}
backend/src/main/java/io/metersphere/base/domain/ZaleniumTest.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.base.domain
;
public
class
ZaleniumTest
{
}
backend/src/main/java/io/metersphere/config/ProxyServletConfiguration.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.config
;
import
io.metersphere.proxy.ProxyServlet
;
import
org.springframework.boot.web.servlet.ServletRegistrationBean
;
import
org.springframework.context.EnvironmentAware
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.Environment
;
@Configuration
public
class
SolrProxyServletConfiguration
{
@Bean
public
ServletRegistrationBean
servletRegistrationBean
(){
ServletRegistrationBean
servletRegistrationBean
=
new
ServletRegistrationBean
(
new
ProxyServlet
(),
"/solr/*"
);
// servletRegistrationBean.addInitParameter("targetUri", "http://localhost:4444");
// servletRegistrationBean.addInitParameter(ProxyServlet.P_LOG, "false");
return
servletRegistrationBean
;
}
}
\ No newline at end of file
backend/src/main/java/io/metersphere/config/RestTemplateConfig.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.config
;
public
class
RestTemplateConfig
{
}
backend/src/main/java/io/metersphere/job/ZaleniumJob.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.job
;
public
class
ZaleniumJob
{
}
backend/src/main/java/io/metersphere/proxy/ProxyServlet.java
0 → 100644
浏览文件 @
147fba84
此差异已折叠。
点击以展开。
backend/src/main/java/io/metersphere/service/ZaleniumService.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere.service
;
public
class
ZaleniumService
{
}
backend/src/test/java/io/metersphere/ZaleniumTest.java
0 → 100644
浏览文件 @
147fba84
package
io.metersphere
;
public
class
ZaleniumTest
{
}
frontend/package.json
浏览文件 @
147fba84
...
...
@@ -41,7 +41,8 @@
"eslint:recommended"
],
"rules"
:
{
"vue/no-unused-components"
:
"off"
"vue/no-unused-components"
:
"off"
,
"no-console"
:
"off"
},
"parserOptions"
:
{
"parser"
:
"babel-eslint"
...
...
frontend/src/business/components/functional/report/FunctionalReportView.vue
浏览文件 @
147fba84
...
...
@@ -6,9 +6,9 @@
<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>
{{
report
N
ame
}}
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/' }">
{{
report
.
projectName
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
report
.
testName
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
report
.
n
ame
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-row>
<el-row
class=
"ms-report-view-btns"
>
...
...
@@ -34,9 +34,11 @@
<el-divider></el-divider>
<el-tabs
v-model=
"active"
type=
"border-card"
:stretch=
"true"
>
<el-tab-pane
:label=
"$t('report.test_details')"
>
<result-details
v-if=
"isRouterAlive"
:video-url=
"videoUrl"
/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('report.test_log_details')"
>
<ms-report-log-details
/>
<ms-report-log-details
:report-id=
"report.id"
/>
</el-tab-pane>
</el-tabs>
...
...
@@ -47,20 +49,22 @@
<
script
>
import
MsReportLogDetails
from
'
./components/LogDetails
'
;
import
ResultDetails
from
'
./components/ResultDetails
'
;
export
default
{
name
:
"
FunctionalReportView
"
,
components
:
{
MsReportLogDetails
MsReportLogDetails
,
ResultDetails
},
data
()
{
return
{
result
:
{},
active
:
'
0
'
,
reportId
:
''
,
reportName
:
''
,
testName
:
''
,
projectName
:
''
videoPath
:
''
,
videoUrl
:
null
,
report
:
{}
,
isRouterAlive
:
true
//控制视图是否显示的变量
}
},
methods
:
{
...
...
@@ -69,31 +73,27 @@
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
;
this
.
report
=
data
;
this
.
report
.
content
=
JSON
.
parse
(
this
.
report
.
content
);
this
.
videoUrl
=
'
proxy/localhost:4444/
'
+
this
.
report
.
content
.
videoUrl
;
this
.
reload
();
//重新渲染组件
}
})
})
;
}
},
reload
()
{
this
.
isRouterAlive
=
false
;
//先关闭,
this
.
$nextTick
(
function
()
{
this
.
isRouterAlive
=
true
;
//再打开
})
}
},
created
()
{
this
.
reportId
=
this
.
$route
.
path
.
split
(
'
/
'
)[
4
];
mounted
()
{
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
;
}
});
}
computed
:
{
reportId
:
function
()
{
return
this
.
$route
.
params
.
reportId
;
}
}
}
...
...
frontend/src/business/components/functional/report/FunctionalTestReport.vue
浏览文件 @
147fba84
...
...
@@ -131,7 +131,7 @@
},
handleEdit
(
report
)
{
this
.
$router
.
push
({
path
:
'
/functional/report
V
iew/
'
+
report
.
id
path
:
'
/functional/report
/v
iew/
'
+
report
.
id
})
},
handleDelete
(
report
)
{
...
...
frontend/src/business/components/functional/report/components/LogDetails.vue
浏览文件 @
147fba84
<
template
>
<div>
LogDetails
<div>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"seleniumLog"
>
<el-input
v-model=
"seleniumLog"
rows=
"15"
type=
"textarea"
></el-input>
</el-tab-pane>
<el-tab-pane
label=
"browserDriverLog"
>
<el-input
v-model=
"browserDriverLog"
rows=
"15"
type=
"textarea"
></el-input>
</el-tab-pane>
</el-tabs>
</div>
<div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"
LogDetails
"
name
:
"
LogDetails
"
,
data
()
{
return
{
seleniumLog
:
''
,
browserDriverLog
:
''
}
},
props
:
{
reportId
:
{
type
:
String
}
},
mounted
()
{
this
.
getLogDetails
(
this
.
reportId
);
},
watch
:
{
reportId
:
function
(
newVal
)
{
this
.
getLogDetails
(
newVal
);
}
},
methods
:
{
getLogDetails
(
reportId
)
{
if
(
reportId
){
let
url
=
'
/functional/report/test/log/
'
+
reportId
;
this
.
$get
(
url
,
(
response
)
=>
{
this
.
seleniumLog
=
response
.
data
.
seleniumLog
;
this
.
browserDriverLog
=
response
.
data
.
browserDriverLog
;
});
}
}
}
}
</
script
>
...
...
frontend/src/business/components/functional/report/components/ResultDetails.vue
0 → 100644
浏览文件 @
147fba84
<
template
>
<div>
<video
id=
"video"
controls=
""
autoplay=
""
class=
"embed-responsive-item"
>
<source
id=
"video-source"
:src=
"videoUrl"
type=
"video/mp4"
>
</video>
</div>
</
template
>
<
script
>
export
default
{
name
:
"
ResultDetails
"
,
props
:
{
videoUrl
:
{
type
:
String
}
}
}
</
script
>
<
style
scoped
>
#video
{
height
:
50%
;
width
:
50%
;
}
</
style
>
frontend/src/i18n/en-US.js
浏览文件 @
147fba84
...
...
@@ -104,7 +104,8 @@ export default {
'
test_overview
'
:
'
Test Overview
'
,
'
test_request_statistics
'
:
'
Test Request Statistics
'
,
'
test_error_log
'
:
'
Test Error Log
'
,
'
test_log_details
'
:
'
Test Log Details
'
'
test_log_details
'
:
'
Test Log Details
'
,
'
test_details
'
:
'
Test Details
'
,
},
load_test
:
{
'
recent
'
:
'
Recent Tests
'
,
...
...
@@ -159,9 +160,9 @@ export default {
'
create
'
:
'
Create Test
'
,
},
fuc_test
:
{
'
select_resource_pool
'
:
'
Please select resource pool
'
,
'
select_resource_pool
'
:
'
Please select resource pool
'
},
i18n
:
{
'
home
'
:
'
Home
'
,
'
home
'
:
'
Home
'
}
};
frontend/src/i18n/zh-CN.js
浏览文件 @
147fba84
...
...
@@ -104,7 +104,8 @@ export default {
'
test_overview
'
:
'
测试概览
'
,
'
test_request_statistics
'
:
'
请求统计
'
,
'
test_error_log
'
:
'
错误记录
'
,
'
test_log_details
'
:
'
日志详情
'
'
test_log_details
'
:
'
日志详情
'
,
'
test_details
'
:
'
测试详情
'
,
},
load_test
:
{
'
recent
'
:
'
最近的测试
'
,
...
...
@@ -159,7 +160,7 @@ export default {
'
create
'
:
'
创建测试
'
,
},
fuc_test
:
{
'
select_resource_pool
'
:
'
请选择资源池
'
,
'
select_resource_pool
'
:
'
请选择资源池
'
},
i18n
:
{
'
home
'
:
'
首页
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录