Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王飞
vehicle-quality-review
Commits
6f92245e
Commit
6f92245e
authored
Apr 12, 2024
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wangdingyi' into 'dev'
查询测试方法 See merge request
!286
parents
2c27b56d
f7a5c09f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
6 deletions
+64
-6
ITestTypeService.java
...iew/src/main/java/com/ruoyi/service/ITestTypeService.java
+1
-1
TestTypeServiceImpl.java
...main/java/com/ruoyi/service/impl/TestTypeServiceImpl.java
+14
-4
TestTypeController.java
...eview/src/main/java/com/ruoyi/web/TestTypeController.java
+1
-1
TestUserCaseListRequest.java
...n/java/com/ruoyi/web/request/TestUserCaseListRequest.java
+20
-0
TestUserCaseListResponse.java
...java/com/ruoyi/web/response/TestUserCaseListResponse.java
+28
-0
No files found.
quality-review/src/main/java/com/ruoyi/service/ITestTypeService.java
View file @
6f92245e
...
...
@@ -21,5 +21,5 @@ public interface ITestTypeService extends IService<TestType> {
* 从科恩获取所有测试方法
* @return
*/
List
<
TestTypeVO
>
getTestTypeList
();
List
<
String
>
getTestTypeList
();
}
quality-review/src/main/java/com/ruoyi/service/impl/TestTypeServiceImpl.java
View file @
6f92245e
...
...
@@ -6,17 +6,17 @@ import com.alibaba.fastjson2.JSONObject;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.domain.TestType
;
import
com.ruoyi.domain.vo.ScenarioVO
;
import
com.ruoyi.domain.vo.TestTypeVO
;
import
com.ruoyi.mapper.TestTypeMapper
;
import
com.ruoyi.service.ITestTypeService
;
import
com.ruoyi.web.request.TestTypeRequest
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
@Transactional
...
...
@@ -40,11 +40,21 @@ public class TestTypeServiceImpl extends ServiceImpl<TestTypeMapper, TestType> i
}
@Override
public
List
<
TestTypeVO
>
getTestTypeList
()
{
public
List
<
String
>
getTestTypeList
()
{
//以post形式请求接口
String
result
=
HttpUtil
.
post
(
"https://10.12.48.78:8090/DescribeScenarioTestTypeList"
,
""
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
return
jsonObject
.
getList
(
"test_type_list"
,
TestTypeVO
.
class
);
return
jsonObject
.
getList
(
"test_type_list"
,
TypeVO
.
class
)
.
stream
()
.
map
(
TypeVO:
:
getName
)
.
collect
(
Collectors
.
toList
());
}
@Data
public
static
class
TypeVO
{
private
String
name
;
}
}
quality-review/src/main/java/com/ruoyi/web/TestTypeController.java
View file @
6f92245e
...
...
@@ -57,7 +57,7 @@ public class TestTypeController extends BaseController {
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getTestTypeList"
)
public
R
<
List
<
TestTypeVO
>>
getTestTypeList
(){
public
R
<
List
<
String
>>
getTestTypeList
(){
return
R
.
ok
(
testTypeService
.
getTestTypeList
());
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/TestUserCaseListRequest.java
0 → 100644
View file @
6f92245e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"TestUserCaseListRequest"
,
description
=
"查询测试用例"
)
public
class
TestUserCaseListRequest
extends
PageDomain
{
@ApiModelProperty
(
"测试场景"
)
private
String
testScenario
;
@ApiModelProperty
(
"测试方法"
)
private
String
testType
;
@ApiModelProperty
(
"用例编号或者名称关键字"
)
private
String
searchKeywords
;
}
quality-review/src/main/java/com/ruoyi/web/response/TestUserCaseListResponse.java
0 → 100644
View file @
6f92245e
package
com
.
ruoyi
.
web
.
response
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@ApiModel
(
value
=
"TestUserCaseListResponse"
,
description
=
"查询测试用例"
)
@Data
public
class
TestUserCaseListResponse
{
@ApiModelProperty
(
"测试场景"
)
private
String
testScenario
;
@ApiModelProperty
(
"测试方法"
)
private
String
testType
;
@ApiModelProperty
(
"用例编号"
)
private
String
useCaseNo
;
@ApiModelProperty
(
"用例名称"
)
private
String
useCaseName
;
@ApiModelProperty
(
"对应输入"
)
private
String
input
;
@ApiModelProperty
(
"用例描述"
)
private
String
description
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment