Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
qa-platform-ui
Commits
5822efde
Commit
5822efde
authored
Jun 04, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增冒烟测试
parent
2f4743f0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
18 deletions
+139
-18
dev.env.js
config/dev.env.js
+3
-3
prod.env.js
config/prod.env.js
+1
-0
jira.js
src/api/jira.js
+8
-0
qaApi.js
src/api/qaApi.js
+17
-0
qaapiRequest.js
src/utils/qaapiRequest.js
+23
-0
EditScene.vue
src/views/auto/EditScene.vue
+0
-3
Notify.vue
src/views/jira/Notify.vue
+87
-12
No files found.
config/dev.env.js
View file @
5822efde
...
@@ -7,9 +7,9 @@ module.exports = merge(prodEnv, {
...
@@ -7,9 +7,9 @@ module.exports = merge(prodEnv, {
ENV_CONFIG
:
'
"dev"
'
,
ENV_CONFIG
:
'
"dev"
'
,
// QA_PLATFORM: '"//localhost:8082"',
// QA_PLATFORM: '"//localhost:8082"',
TESTDATA_API
:
'
"//testdata.liangkebang.com"
'
,
TESTDATA_API
:
'
"//testdata.liangkebang.com"
'
,
//
HOLMES: '"//localhost:8084"',
HOLMES
:
'
"//localhost:8084"
'
,
QA_PLATFORM
:
'
"//qa-platform-fe.liangkebang.net/"
'
,
QA_PLATFORM
:
'
"//qa-platform-fe.liangkebang.net/"
'
,
HOLMES
:
'
"//holmes-fe.liangkebang.net/"
'
,
//
HOLMES: '"//holmes-fe.liangkebang.net/"',
// HOLMES: '"//192.168.29.143:8084/"'
QA_API
:
"
//qaapi.liangkebang.com/
"
})
})
config/prod.env.js
View file @
5822efde
...
@@ -5,4 +5,5 @@ module.exports = {
...
@@ -5,4 +5,5 @@ module.exports = {
QA_PLATFORM
:
'
"//qa-platform.xyqb.com/"
'
,
QA_PLATFORM
:
'
"//qa-platform.xyqb.com/"
'
,
TESTDATA_API
:
'
"//testdata.liangkebang.com"
'
,
TESTDATA_API
:
'
"//testdata.liangkebang.com"
'
,
HOLMES
:
'
"//holmes.xyqb.com/"
'
,
HOLMES
:
'
"//holmes.xyqb.com/"
'
,
QA_API
:
"
//qaapi.liangkebang.com/
"
,
}
}
\ No newline at end of file
src/api/jira.js
View file @
5822efde
...
@@ -46,3 +46,11 @@ export function sendScheduleReport(data) {
...
@@ -46,3 +46,11 @@ export function sendScheduleReport(data) {
data
data
})
})
}
}
export
function
sendSmokingResult
(
data
)
{
return
request
({
url
:
'
/jira/send/smoking
'
,
method
:
'
post
'
,
data
})
}
src/api/qaApi.js
0 → 100644
View file @
5822efde
import
request
from
'
@/utils/qaapiRequest
'
export
function
getGitlabProject
(
queryParams
)
{
return
request
({
url
:
'
/proconfig/get_project
'
,
method
:
'
get
'
,
params
:
queryParams
})
}
export
function
getGitlabBranch
(
queryParams
)
{
return
request
({
url
:
'
/pipeline/getGitBranch
'
,
method
:
'
get
'
,
params
:
queryParams
})
}
src/utils/qaapiRequest.js
0 → 100644
View file @
5822efde
import
axios
from
'
axios
'
const
service
=
axios
.
create
(
{
baseURL
:
process
.
env
.
QA_API
,
timeout
:
500000
}
)
// request interceptor
service
.
interceptors
.
request
.
use
(
)
// response interceptor
service
.
interceptors
.
response
.
use
(
response
=>
response
,
error
=>
{
console
.
log
(
'
error
'
+
error
)
// for debug
return
Promise
.
reject
(
error
)
}
)
export
default
service
src/views/auto/EditScene.vue
View file @
5822efde
...
@@ -643,7 +643,4 @@ export default {
...
@@ -643,7 +643,4 @@ export default {
margin-left: 5px;
margin-left: 5px;
// margin-top:10px
// margin-top:10px
}
}
.div-operation {
// margin-top: 6px;
}
</
style
>
</
style
>
src/views/jira/Notify.vue
View file @
5822efde
...
@@ -14,11 +14,12 @@
...
@@ -14,11 +14,12 @@
<el-table-column
prop=
"creator"
label=
"创建人"
width=
"80px"
>
<el-table-column
prop=
"creator"
label=
"创建人"
width=
"80px"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
width=
"180px"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"创建时间"
width=
"180px"
></el-table-column>
<el-table-column
label=
"操作"
width=
"
3
00px"
>
<el-table-column
label=
"操作"
width=
"
4
00px"
>
<slot
slot-scope=
"scope"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"primary"
@
click=
"openEditDialog(scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"openEditDialog(scope.row)"
>
编辑
</el-button>
<el-button
type=
"danger"
@
click=
"delProjectRobot(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"delProjectRobot(scope.row.id)"
>
删除
</el-button>
<el-button
type=
"success"
@
click=
"openSendDialog(scope.row)"
>
发送进度
</el-button>
<el-button
type=
"warning"
size=
"small"
@
click=
"openSendSmokingDialog(scope.row)"
>
冒烟测试
</el-button>
<el-button
type=
"success"
size=
"small"
@
click=
"openSendDialog(scope.row)"
>
发送进度
</el-button>
</slot>
</slot>
</el-table-column>
</el-table-column>
<!--
<el-table-column
prop=
"updateTime"
label=
"更新时间"
></el-table-column>
-->
<!--
<el-table-column
prop=
"updateTime"
label=
"更新时间"
></el-table-column>
-->
...
@@ -93,6 +94,28 @@
...
@@ -93,6 +94,28 @@
<el-button
type=
"primary"
@
click=
"sendSchedule"
>
发 送
</el-button>
<el-button
type=
"primary"
@
click=
"sendSchedule"
>
发 送
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
<!-- 冒烟测试结果对话框 -->
<el-dialog
title=
"发送冒烟测试结果"
:visible.sync=
"smokingDialogVisible"
width=
"60%"
@
close=
"closeSmokingDialog"
>
<el-form
ref=
"smokingFormRef"
:rules=
"smokingFormRules"
:model=
"sendSmokingForm"
label-width=
"150px"
>
<el-form-item
label=
"冒烟测试结果"
prop=
"result"
>
<el-select
v-model=
"sendSmokingForm.result"
placeholder=
"请选择冒烟测试结果"
>
<el-option
v-for=
"item in smokingResult"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"冒烟测试进度"
prop=
"progress"
>
<el-input
v-model=
"sendSmokingForm.progress"
maxlength=
"3"
placeholder=
"请输入测试进度百分比(不需要%)"
></el-input>
</el-form-item>
<el-form-item
label=
"风险点"
prop=
"risk"
>
<el-input
v-model=
"sendSmokingForm.risk"
type=
"textarea"
placeholder=
"请输入测试风险点(非必填)"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"smokingDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sendSmoking"
>
发 送
</el-button>
</span>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -103,7 +126,8 @@ import {
...
@@ -103,7 +126,8 @@ import {
addProjectRobot
,
addProjectRobot
,
modifyProjectRobot
,
modifyProjectRobot
,
delProjectRobot
,
delProjectRobot
,
sendScheduleReport
sendScheduleReport
,
sendSmokingResult
}
from
'
@/api/jira
'
}
from
'
@/api/jira
'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -118,6 +142,7 @@ export default {
...
@@ -118,6 +142,7 @@ export default {
addDialogVisible
:
false
,
addDialogVisible
:
false
,
editDialogVisible
:
false
,
editDialogVisible
:
false
,
sendScheduleDialogVisible
:
false
,
sendScheduleDialogVisible
:
false
,
smokingDialogVisible
:
false
,
robotForm
:
{
robotForm
:
{
projectName
:
''
,
projectName
:
''
,
dingUrl
:
''
,
dingUrl
:
''
,
...
@@ -126,17 +151,24 @@ export default {
...
@@ -126,17 +151,24 @@ export default {
},
},
editRobotForm
:
{},
editRobotForm
:
{},
sendProjectRobot
:
{},
sendProjectRobot
:
{},
sendScheduleData
:
{
// 发送进度报告参数
jiraProject
:
''
,
sendScheduleData
:
{},
testProject
:
''
,
// 发送冒烟结果参数
progress
:
''
,
sendSmokingData
:
{},
risk
:
''
,
webhook
:
''
},
delRobotParams
:
{
delRobotParams
:
{
projectRobotId
:
''
projectRobotId
:
''
},
},
sendScheduleForm
:
{},
sendScheduleForm
:
{},
smokingResult
:
[
{
label
:
'
冒烟通过
'
,
value
:
true
},
{
label
:
'
测试打回
'
,
value
:
false
}
],
formRules
:
{
formRules
:
{
projectName
:
[
projectName
:
[
{
required
:
true
,
message
:
'
请输入项目名称
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
'
请输入项目名称
'
,
trigger
:
'
blur
'
}
...
@@ -157,16 +189,28 @@ export default {
...
@@ -157,16 +189,28 @@ export default {
trigger
:
'
blur
'
trigger
:
'
blur
'
}
}
]
]
},
sendSmokingForm
:
{},
smokingFormRules
:
{
result
:
[
{
required
:
true
,
message
:
'
请选择冒烟测试结果
'
,
trigger
:
'
blur
'
}
]
}
}
}
}
},
},
methods
:
{
methods
:
{
// 获取ding_robot列表
getProjectRobotList
()
{
getProjectRobotList
()
{
getProjectRobotList
(
this
.
queryInfo
).
then
((
resp
)
=>
{
getProjectRobotList
(
this
.
queryInfo
).
then
((
resp
)
=>
{
this
.
dingRobotList
=
resp
.
data
.
data
.
list
this
.
dingRobotList
=
resp
.
data
.
data
.
list
this
.
totalNum
=
resp
.
data
.
data
.
total
this
.
totalNum
=
resp
.
data
.
data
.
total
})
})
},
},
// 获取jira项目列表
getJiraProjectList
()
{
getJiraProjectList
()
{
getJiraProjectList
().
then
((
resp
)
=>
{
getJiraProjectList
().
then
((
resp
)
=>
{
this
.
jiraProjectList
=
resp
.
data
.
data
this
.
jiraProjectList
=
resp
.
data
.
data
...
@@ -256,6 +300,29 @@ export default {
...
@@ -256,6 +300,29 @@ export default {
}
}
})
})
},
},
// 发送冒烟测试结果
sendSmoking
()
{
this
.
sendSmokingData
.
jiraProjectKey
=
this
.
sendProjectRobot
.
jiraProjectKey
this
.
sendSmokingData
.
testProjectName
=
this
.
sendProjectRobot
.
projectName
this
.
sendSmokingData
.
progress
=
this
.
sendSmokingForm
.
progress
+
'
%
'
this
.
sendSmokingData
.
risk
=
this
.
sendSmokingForm
.
risk
this
.
sendSmokingData
.
webhook
=
this
.
sendProjectRobot
.
dingUrl
this
.
sendSmokingData
.
result
=
this
.
sendSmokingForm
.
result
this
.
$refs
.
smokingFormRef
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
}
else
{
sendSmokingResult
(
this
.
sendSmokingData
).
then
((
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
smokingDialogVisible
=
false
return
this
.
$message
.
success
(
'
发送成功!
'
)
}
else
{
return
this
.
$message
.
error
(
'
发送失败!
'
)
}
})
}
})
},
handleSizeChange
(
newSize
)
{
handleSizeChange
(
newSize
)
{
this
.
queryInfo
.
pageSize
=
newSize
this
.
queryInfo
.
pageSize
=
newSize
this
.
getProjectRobotList
()
this
.
getProjectRobotList
()
...
@@ -273,6 +340,11 @@ export default {
...
@@ -273,6 +340,11 @@ export default {
this
.
sendScheduleDialogVisible
=
true
this
.
sendScheduleDialogVisible
=
true
this
.
sendProjectRobot
=
projectRobot
this
.
sendProjectRobot
=
projectRobot
},
},
// 打开发送冒烟测试结果对话框
openSendSmokingDialog
(
projectRobot
)
{
this
.
smokingDialogVisible
=
true
this
.
sendProjectRobot
=
projectRobot
},
closeAddDialog
()
{
closeAddDialog
()
{
this
.
$refs
.
addRobotFormRef
.
resetFields
()
this
.
$refs
.
addRobotFormRef
.
resetFields
()
},
},
...
@@ -281,6 +353,9 @@ export default {
...
@@ -281,6 +353,9 @@ export default {
},
},
closeSendDialog
()
{
closeSendDialog
()
{
this
.
$refs
.
sendFormRef
.
resetFields
()
this
.
$refs
.
sendFormRef
.
resetFields
()
},
closeSmokingDialog
()
{
this
.
$refs
.
smokingFormRef
.
resetFields
()
}
}
},
},
created
()
{
created
()
{
...
...
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