Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
willdesk_apiauto
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
29
Issues
29
List
Boards
Labels
Service Desk
Milestones
Merge Requests
29
Merge Requests
29
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
桦生 詹
willdesk_apiauto
Commits
d52e1d38
"TestData/git@172.16.40.31:zhanhuasheng/willdesk_apiauto.git" did not exist on "b28918c57a5596fe117615d7ed976a06a3f97682"
Commit
d52e1d38
authored
Mar 29, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增用例
parent
bd758b61
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
2 deletions
+91
-2
TestData/inbox/ticketDetail_test_data.py
TestData/inbox/ticketDetail_test_data.py
+1
-1
TestFile/inbox/ticketDetail_select.py
TestFile/inbox/ticketDetail_select.py
+6
-0
YamlCase/inbox/ticketDetail.yaml
YamlCase/inbox/ticketDetail.yaml
+83
-0
main.py
main.py
+1
-1
No files found.
TestData/inbox/ticketDetail_test_data.py
View file @
d52e1d38
from
Utils.global_variate
import
Global
class
ticketDetailData
(
Global
):
pass
\ No newline at end of file
noteMsg
=
'test_note'
\ No newline at end of file
TestFile/inbox/ticketDetail_select.py
View file @
d52e1d38
import
random
from
Utils.sql_handler
import
test_env_conn
from
TestData.inbox.ticketDetail_test_data
import
ticketDetailData
...
...
@@ -15,6 +17,7 @@ customer_select_sql = f'select * from `customer` where id = {customer_id}'
customer_select_result
=
test_env_conn
.
select_one_value
(
sql
=
customer_select_sql
)
customer_time_zone
=
customer_select_result
[
'time_zone'
]
customer_location
=
customer_select_result
[
'location'
]
customer_name
=
customer_select_result
[
'name'
]
customer_email
=
customer_select_result
[
'email'
]
customer_phone
=
customer_select_result
[
'phone'
]
customer_is_visitor
=
customer_select_result
[
'is_visitor'
]
...
...
@@ -25,3 +28,6 @@ setattr(ticketDetailData, 'customer_email', customer_email)
setattr
(
ticketDetailData
,
'customer_phone'
,
customer_phone
)
setattr
(
ticketDetailData
,
'customer_is_visitor'
,
customer_is_visitor
)
setattr
(
ticketDetailData
,
'customer_last_msg_time'
,
customer_last_msg_time
)
setattr
(
ticketDetailData
,
'customer_name'
,
customer_name
)
YamlCase/inbox/ticketDetail.yaml
View file @
d52e1d38
...
...
@@ -13,3 +13,86 @@ api1:
-
eq
:
{
"
$.data.isVisitor"
:
"
${customer_is_visitor}"
}
-
eq
:
{
"
$.data.customerId"
:
"
${customer_id}"
}
-
eq
:
{
"
$.data.lastSeenTime"
:
"
'${customer_last_msg_time}'"
}
api2
:
title
:
设置笔记注释
url
:
/api/v1/note/edit
method
:
post
data
:
{
"
id"
:
0
,
"
uid"
:
"
${customer_id}"
,
"
uType"
:
1
,
"
customerServiceName"
:
"
${customer_name}"
,
"
noteMsg"
:
"
${noteMsg}"
,
"
siteId"
:
"
${shopId}"
,
"
v"
:
"
${v}"
}
set_value
:
{
"
note_id"
:
"
$.data.id"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api3
:
title
:
检查笔记注释是否设置
url
:
/api/v1/note/list
method
:
post
data
:
{
"
uid"
:
"
${customer_id}"
,
"
uType"
:
1
,
"
customerServiceName"
:
"
${customer_name}"
,
"
siteId"
:
"
${shopId}"
,
"
page"
:
1
,
"
pageSize"
:
2
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.list[0].id"
:
"
${note_id}"
}
-
eq
:
{
"
$.data.list[?(@.id
==
'${note_id}')].noteMsg"
:
"
${noteMsg}"
}
api4
:
title
:
删除笔记注释
url
:
/api/v1/note/delete
method
:
post
data
:
{
"
id"
:
"
${note_id}"
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api5
:
title
:
检查获取shopify订单的接口是否正常
url
:
/api/v1/order/getCustomerOrderList
method
:
post
data
:
{
"
email"
:
"
${customer_email}"
,
"
pageNum"
:
1
,
"
pageSize"
:
2
,
"
shopId"
:
"
${shopId}"
,
"
phone"
:
"
${customer_phone}"
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api6
:
title
:
设置快捷发送为ctrl + enter
url
:
/api/v1/customerService/updateCustomerServiceAccount
method
:
post
data
:
{
"
id"
:
"
${userId}"
,
"
enterType"
:
2
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api7
:
title
:
检查快捷发送是否设置成功
url
:
/api/v1/customerService/getCustomerServiceInfo?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.enterType"
:
2
}
api8
:
title
:
设置快捷发送为shift + enter
url
:
/api/v1/customerService/updateCustomerServiceAccount
method
:
post
data
:
{
"
id"
:
"
${userId}"
,
"
enterType"
:
3
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api9
:
title
:
检查快捷发送是否设置成功
url
:
/api/v1/customerService/getCustomerServiceInfo?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.enterType"
:
3
}
api10
:
title
:
设置快捷发送为enter
url
:
/api/v1/customerService/updateCustomerServiceAccount
method
:
post
data
:
{
"
id"
:
"
${userId}"
,
"
enterType"
:
1
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api11
:
title
:
检查快捷发送是否设置成功
url
:
/api/v1/customerService/getCustomerServiceInfo?v=${v}
method
:
get
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.enterType"
:
1
}
\ No newline at end of file
main.py
View file @
d52e1d38
...
...
@@ -4,7 +4,7 @@ from Utils.sql_handler import test_env_conn
if
__name__
==
'__main__'
:
try
:
# pytest.main(['-vs',r'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase\inbox\test_06_channel.py',f'--alluredir=./allureReports/json','--clean-alluredir'])
pytest
.
main
([
'-vs'
,
r
'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase
\inbox\test_06_channel.py
'
,
f
'--html=./report.html'
])
#allure报告一直生成不了,改用pytest自带报告
pytest
.
main
([
'-vs'
,
r
'C:\Users\rd71\PycharmProjects\willdesk_api_auto\TestCase'
,
f
'--html=./report.html'
])
#allure报告一直生成不了,改用pytest自带报告
finally
:
...
...
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