Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
dbf41ecb
提交
dbf41ecb
authored
3月 22, 2022
作者:
黄夏豪
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(base): 修复了静态资源无法读取的问题
上级
e64c2b35
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
9 行增加
和
11 行删除
+9
-11
CaseActuator.java
.../main/java/org/matrix/actuators/usecase/CaseActuator.java
+4
-4
ResourcesConfig.java
...main/java/org/matrix/autotest/config/ResourcesConfig.java
+2
-1
FileSysController.java
...main/java/org/matrix/fs/controller/FileSysController.java
+3
-6
没有找到文件。
kt-base/src/main/java/org/matrix/actuators/usecase/CaseActuator.java
浏览文件 @
dbf41ecb
...
@@ -93,7 +93,7 @@ public class CaseActuator implements Actuator {
...
@@ -93,7 +93,7 @@ public class CaseActuator implements Actuator {
testCaseBto
.
getTestData
());
testCaseBto
.
getTestData
());
//执行中置动作
//执行中置动作
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
,
envId
,
projectId
,
baseTestCaseResponseDetail
.
getResponseBody
()
,
MoveStrategy
.
MID_MOVE
);
,
envId
,
projectId
,
baseTestCaseResponseDetail
!=
null
?
baseTestCaseResponseDetail
.
getResponseBody
():
null
,
MoveStrategy
.
MID_MOVE
);
//进行检验
//进行检验
CheckPointResult
checkPointResult
=
getCheckPointResult
(
testCaseBto
.
getTestCase
(),
CheckPointResult
checkPointResult
=
getCheckPointResult
(
testCaseBto
.
getTestCase
(),
testCaseBto
.
getTestData
(),
testCaseBto
.
getTestData
(),
...
@@ -102,7 +102,7 @@ public class CaseActuator implements Actuator {
...
@@ -102,7 +102,7 @@ public class CaseActuator implements Actuator {
baseTestCaseResponseDetail
);
baseTestCaseResponseDetail
);
//执行后置动作
//执行后置动作
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
,
envId
,
projectId
,
baseTestCaseResponseDetail
.
getResponseBody
()
,
MoveStrategy
.
AFT_MOVE
);
,
envId
,
projectId
,
baseTestCaseResponseDetail
!=
null
?
baseTestCaseResponseDetail
.
getResponseBody
():
null
,
MoveStrategy
.
AFT_MOVE
);
TestDataExecuteResult
testDataExecuteResult
=
new
TestDataExecuteResult
(
TestDataExecuteResult
testDataExecuteResult
=
new
TestDataExecuteResult
(
dataStartTime
,
dataStartTime
,
LocalDateTime
.
now
(),
LocalDateTime
.
now
(),
...
@@ -150,7 +150,7 @@ public class CaseActuator implements Actuator {
...
@@ -150,7 +150,7 @@ public class CaseActuator implements Actuator {
LogQueueRuntime
.
addNewLog
(
this
.
getClass
(),
CASE_ACTUATOR
,
"[用例执行器] 即将开始执行中置动作"
);
LogQueueRuntime
.
addNewLog
(
this
.
getClass
(),
CASE_ACTUATOR
,
"[用例执行器] 即将开始执行中置动作"
);
//执行中置动作
//执行中置动作
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
,
envId
,
projectId
,
baseTestCaseResponseDetail
.
getResponseBody
()
,
MoveStrategy
.
MID_MOVE
);
,
envId
,
projectId
,
baseTestCaseResponseDetail
!=
null
?
baseTestCaseResponseDetail
.
getResponseBody
():
null
,
MoveStrategy
.
MID_MOVE
);
CheckPointResult
checkPointResult
=
getCheckPointResult
(
testCaseBto
.
getTestCase
(),
CheckPointResult
checkPointResult
=
getCheckPointResult
(
testCaseBto
.
getTestCase
(),
testData
,
testData
,
envId
,
envId
,
...
@@ -169,7 +169,7 @@ public class CaseActuator implements Actuator {
...
@@ -169,7 +169,7 @@ public class CaseActuator implements Actuator {
LogQueueRuntime
.
addNewLog
(
this
.
getClass
(),
CASE_ACTUATOR
,
"用例执行结果:"
+
JSON
.
toJSONString
(
testDataExecuteResult
));
LogQueueRuntime
.
addNewLog
(
this
.
getClass
(),
CASE_ACTUATOR
,
"用例执行结果:"
+
JSON
.
toJSONString
(
testDataExecuteResult
));
//执行后置动作
//执行后置动作
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
executeMove
(
testCaseBto
.
getTestCase
().
getMoveAfterTest
()
,
envId
,
projectId
,
baseTestCaseResponseDetail
.
getResponseBody
()
,
MoveStrategy
.
AFT_MOVE
);
,
envId
,
projectId
,
baseTestCaseResponseDetail
!=
null
?
baseTestCaseResponseDetail
.
getResponseBody
():
null
,
MoveStrategy
.
AFT_MOVE
);
changeExecutionHistoryStatus
(
ExecutionHistoryStatus
.
FINISH
);
changeExecutionHistoryStatus
(
ExecutionHistoryStatus
.
FINISH
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
dataSourceService
.
switchMainDataSource
();
dataSourceService
.
switchMainDataSource
();
...
...
kt-web/src/main/java/org/matrix/autotest/config/ResourcesConfig.java
浏览文件 @
dbf41ecb
...
@@ -15,6 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
...
@@ -15,6 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
public
class
ResourcesConfig
implements
WebMvcConfigurer
{
public
class
ResourcesConfig
implements
WebMvcConfigurer
{
@Override
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/reports/**"
).
addResourceLocations
(
"classpath:/reports/"
);
String
fileUrl
=
"file:"
+
System
.
getProperty
(
"user.dir"
)
+
"/htmls/"
;
registry
.
addResourceHandler
(
"/**"
).
addResourceLocations
(
fileUrl
);
}
}
}
}
kt-web/src/main/java/org/matrix/fs/controller/FileSysController.java
浏览文件 @
dbf41ecb
...
@@ -6,10 +6,7 @@ import org.springframework.core.io.UrlResource;
...
@@ -6,10 +6,7 @@ import org.springframework.core.io.UrlResource;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -26,9 +23,9 @@ import java.io.IOException;
...
@@ -26,9 +23,9 @@ import java.io.IOException;
@RequestMapping
@RequestMapping
public
class
FileSysController
{
public
class
FileSysController
{
@GetMapping
(
"/report
/{fileName}
"
)
@GetMapping
(
"/report"
)
public
ResponseEntity
downloadAlertWeb
(
HttpServletRequest
request
,
public
ResponseEntity
downloadAlertWeb
(
HttpServletRequest
request
,
@
PathVariable
String
fileName
)
{
@
RequestParam
String
fileName
)
{
//1.拼接 - > url
//1.拼接 - > url
String
fileUrl
=
"file:"
+
System
.
getProperty
(
"user.dir"
)
+
"/htmls/"
+
fileName
;
String
fileUrl
=
"file:"
+
System
.
getProperty
(
"user.dir"
)
+
"/htmls/"
+
fileName
;
try
{
try
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论