Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
d73b2105
提交
d73b2105
authored
3月 15, 2022
作者:
Matrix
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(测试用例): 补充了测试用例的一些字段(tag,defaultEnv)
上级
31be1b94
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
10 行增加
和
196 行删除
+10
-196
SqlExpActuator.java
...rc/main/java/org/matrix/actuators/sql/SqlExpActuator.java
+1
-1
TestCase.java
...se/src/main/java/org/matrix/database/entity/TestCase.java
+6
-0
CheckPointException.java
...c/main/java/org/matrix/exception/CheckPointException.java
+0
-1
maven-wrapper.jar
kt-user/.mvn/wrapper/maven-wrapper.jar
+0
-0
maven-wrapper.properties
kt-user/.mvn/wrapper/maven-wrapper.properties
+0
-2
mvnw
kt-user/mvnw
+0
-0
mvnw.cmd
kt-user/mvnw.cmd
+0
-188
TestCaseController.java
...va/org/matrix/autotest/controller/TestCaseController.java
+2
-4
pom.xml
pom.xml
+1
-0
没有找到文件。
kt-base/src/main/java/org/matrix/actuators/sql/SqlExpActuator.java
浏览文件 @
d73b2105
...
@@ -118,7 +118,7 @@ public class SqlExpActuator implements Actuator {
...
@@ -118,7 +118,7 @@ public class SqlExpActuator implements Actuator {
SqlRegularObject
sqlReg
=
varList
.
get
(
0
);
SqlRegularObject
sqlReg
=
varList
.
get
(
0
);
DynamicVariable
variable
=
varService
.
getByName
(
sqlReg
.
getVarName
(),
projectId
)
DynamicVariable
variable
=
varService
.
getByName
(
sqlReg
.
getVarName
(),
projectId
)
.
map
(
DynamicVariable:
:
parseSqlDetail
)
.
map
(
DynamicVariable:
:
parseSqlDetail
)
.
orElseThrow
(()
->
new
GlobalException
(
"没有找到name = "
+
sqlReg
.
getVarName
()
+
" 的动态变量"
));
.
orElseThrow
(()
->
new
GlobalException
(
String
.
format
(
"没有找到project id = %d 且 name = %s 的动态变量"
,
projectId
,
sqlReg
.
getVarName
())
));
return
parseVar
(
envId
,
sqlReg
.
getIndex
(),
projectId
,
variable
);
return
parseVar
(
envId
,
sqlReg
.
getIndex
(),
projectId
,
variable
);
}
else
{
}
else
{
throw
new
GlobalException
(
"varNameString 参数请一次只输入一个动态变量! 你的提供的参数为: "
+
varNameString
);
throw
new
GlobalException
(
"varNameString 参数请一次只输入一个动态变量! 你的提供的参数为: "
+
varNameString
);
...
...
kt-base/src/main/java/org/matrix/database/entity/TestCase.java
浏览文件 @
d73b2105
...
@@ -48,4 +48,10 @@ public class TestCase extends BaseEntity {
...
@@ -48,4 +48,10 @@ public class TestCase extends BaseEntity {
@ApiModelProperty
(
"用例描述"
)
@ApiModelProperty
(
"用例描述"
)
private
String
des
;
private
String
des
;
@ApiModelProperty
(
"默认环境Id"
)
private
Long
defaultEnv
;
@ApiModelProperty
(
"标签"
)
private
String
tag
;
}
}
kt-base/src/main/java/org/matrix/exception/CheckPointException.java
浏览文件 @
d73b2105
...
@@ -8,5 +8,4 @@ public class CheckPointException extends RuntimeException {
...
@@ -8,5 +8,4 @@ public class CheckPointException extends RuntimeException {
public
CheckPointException
(
String
message
){
public
CheckPointException
(
String
message
){
super
(
message
);
super
(
message
);
}
}
}
}
kt-user/.mvn/wrapper/maven-wrapper.jar
deleted
100644 → 0
浏览文件 @
31be1b94
File deleted
kt-user/.mvn/wrapper/maven-wrapper.properties
deleted
100644 → 0
浏览文件 @
31be1b94
distributionUrl
=
https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
wrapperUrl
=
https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
kt-user/mvnw
deleted
100755 → 0
浏览文件 @
31be1b94
差异被折叠。
点击展开。
kt-user/mvnw.cmd
deleted
100644 → 0
浏览文件 @
31be1b94
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
if "%MVNW_VERBOSE%" == "true" (
echo Found %WRAPPER_JAR%
)
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
)
if "%MVNW_VERBOSE%" == "true" (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
)
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
if "%MVNW_VERBOSE%" == "true" (
echo Finished downloading %WRAPPER_JAR%
)
)
@REM End of extension
@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*
%MAVEN_JAVA_EXE% ^
%JVM_CONFIG_MAVEN_PROPS% ^
%MAVEN_OPTS% ^
%MAVEN_DEBUG_OPTS% ^
-classpath %WRAPPER_JAR% ^
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
cmd /C exit /B %ERROR_CODE%
kt-web/src/main/java/org/matrix/autotest/controller/TestCaseController.java
浏览文件 @
d73b2105
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.matrix.autotest.utils.PageTools
;
import
org.matrix.database.entity.TestCase
;
import
org.matrix.database.entity.TestCase
;
import
org.matrix.database.entity.TestData
;
import
org.matrix.database.entity.TestData
;
import
org.matrix.database.service.ITestCaseService
;
import
org.matrix.database.service.ITestCaseService
;
...
@@ -71,14 +70,13 @@ public class TestCaseController {
...
@@ -71,14 +70,13 @@ public class TestCaseController {
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
int
pageNum
,
String
name
,
@PathVariable
Long
projectId
)
{
String
name
,
@PathVariable
Long
projectId
)
{
final
long
start
=
System
.
currentTimeMillis
();
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
Page
<
TestCase
>
results
=
Optional
.
ofNullable
(
testCaseService
.
page
(
Page
.
of
(
pageNum
,
pageSize
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
).
eq
(
TestCase:
:
getProjectId
,
projectId
)
,
Wrappers
.
lambdaQuery
(
TestCase
.
class
).
eq
(
TestCase:
:
getProjectId
,
projectId
)
.
like
(
StringUtils
.
hasLength
(
name
)
.
like
(
StringUtils
.
hasLength
(
name
)
,
TestCase:
:
getName
,
name
))).
orElse
(
new
Page
<>());
,
TestCase:
:
getName
,
name
))).
orElse
(
new
Page
<>());
PageTools
.
pageTool
(
pageSize
,
pageNum
,
results
);
// TODO 暂时注解掉,关于页码超出的范围要额外处理
System
.
out
.
println
(
System
.
currentTimeMillis
()
-
start
);
// PageTools.pageTool(pageSize, pageNum, results
);
return
results
.
getRecords
().
size
()
!=
0
return
results
.
getRecords
().
size
()
!=
0
?
CommonResult
.
success
(
results
,
"查询成功"
)
?
CommonResult
.
success
(
results
,
"查询成功"
)
:
CommonResult
.
failed
(
results
,
"查询失败或无数据"
);
:
CommonResult
.
failed
(
results
,
"查询失败或无数据"
);
...
...
pom.xml
浏览文件 @
d73b2105
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
<module>
kt-base
</module>
<module>
kt-base
</module>
<module>
kt-script
</module>
<module>
kt-script
</module>
<module>
kt-web
</module>
<module>
kt-web
</module>
<module>
kt-user
</module>
</modules>
</modules>
<properties>
<properties>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论