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
75f3fc35
Commit
75f3fc35
authored
Dec 02, 2024
by
zhanhuasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
e4895f41
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
15 deletions
+8
-15
TestData/billing/buyPlan_test_data.py
TestData/billing/buyPlan_test_data.py
+1
-0
YamlCase/automation/ai.yaml
YamlCase/automation/ai.yaml
+5
-12
YamlCase/billing/buyPlan.yaml
YamlCase/billing/buyPlan.yaml
+1
-1
main.py
main.py
+1
-2
No files found.
TestData/billing/buyPlan_test_data.py
View file @
75f3fc35
...
...
@@ -5,3 +5,4 @@ class buyPlanData(Global):
numItem
=
[
1
,
2
,
10
]
#有额度限制的服务
today
=
str
(
datetime
.
datetime
.
now
().
date
())
next_month
=
str
(
datetime
.
date
.
today
()
+
datetime
.
timedelta
(
days
=
30
))
ProPlanId
=
12
\ No newline at end of file
YamlCase/automation/ai.yaml
View file @
75f3fc35
...
...
@@ -75,28 +75,21 @@ api8:
-
eq
:
{
"
$.code"
:
0
}
-
exec
:
{
"
code"
:
"
assert
res.json()['data']['total']
==
str(int('${url_num}')
+
1)"
}
api9
:
title
:
编辑url
url
:
api/v1/willai/local/editAiUrl
method
:
post
data
:
{
"
shopId"
:
"
${shopId}"
,
"
url"
:
"
${edit_url}"
,
"
id"
:
"
${url_id}"
,
"
v"
:
"
${v}"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
api10
:
title
:
查询url接口
url
:
api/v1/willai/local/aiUrlList
method
:
post
data
:
{
"
page"
:
1
,
"
pageSize"
:
100
,
"
shopId"
:
"
${shopId}"
,
"
v"
:
"
${v}"
,
"
category"
:
1
}
data
:
{
"
page"
:
1
,
"
pageSize"
:
100
,
"
shopId"
:
"
${shopId}"
,
"
v"
:
"
${v}"
,
"
category"
:
1
,
"
search"
:
"
"
,
"
sortType"
:
0
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
eq
:
{
"
$.data.list[?(@.id
==
'${url_id}')].url"
:
"
${edit_url}"
}
api11
:
title
:
刷新url
url
:
api/v1/willai/local/
reload
AiUrl
url
:
api/v1/willai/local/
operate
AiUrl
method
:
post
data
:
{
"
shopId"
:
"
${shopId}"
,
"
id
"
:[
"
${url_id}"
],
"
v"
:
"
${v}"
}
data
:
{
"
shopId"
:
"
${shopId}"
,
"
id
List"
:[
"
${url_id}"
],
"
v"
:
"
${v}"
,
"
selectAll"
:
false
,
"
status"
:
1
,
"
excludeIdList"
:
[]
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
...
...
@@ -104,7 +97,7 @@ api12:
title
:
删除url
url
:
api/v1/willai/local/deleteAiUrl
method
:
post
data
:
{
"
shopId"
:
"
${shopId}"
,
"
id
"
:[
"
${url_id}"
],
"
v"
:
"
${v}"
}
data
:
{
"
shopId"
:
"
${shopId}"
,
"
id
List"
:[
"
${url_id}"
],
"
v"
:
"
${v}"
,
"
selectAll"
:
false
,
"
status"
:
2
,
"
excludeIdList"
:
[]
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
...
...
@@ -112,7 +105,7 @@ api13:
title
:
查询url接口
url
:
api/v1/willai/local/aiUrlList
method
:
post
data
:
{
"
page"
:
1
,
"
pageSize"
:
100
,
"
shopId"
:
"
${shopId}"
,
"
v"
:
"
${v}"
,
"
category"
:
1
}
data
:
{
"
page"
:
1
,
"
pageSize"
:
100
,
"
shopId"
:
"
${shopId}"
,
"
v"
:
"
${v}"
,
"
category"
:
1
,
"
sortType"
:
0
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
-
not_in_list
:
{
"
$.data.list[*].id"
:
"
${url_id}"
}
...
...
YamlCase/billing/buyPlan.yaml
View file @
75f3fc35
...
...
@@ -2,7 +2,7 @@ api1:
title
:
查询当前月度套餐种类
url
:
/api/v1/businessPlan/getBasicPlan?planType=1&v=${v}
method
:
get
set_value
:
{
"
ProPlanId"
:
"
$.data.basicPlanList[?(@.name
==
'Pro')].id"
,
"
FreePlanId"
:
"
$.data.basicPlanList[?(@.name
==
'Free')].id"
}
set_value
:
{
"
FreePlanId"
:
"
$.data.basicPlanList[?(@.name
==
'Free')].id"
}
expected
:
-
eq
:
{
"
$.code"
:
0
}
...
...
main.py
View file @
75f3fc35
import
pytest
from
Utils.webhook_handler
import
webhook
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'
,
'
./TestCase
'
,
f
'--html=./report.html'
])
#allure报告一直生成不了,改用pytest自带报告
pytest
.
main
([
'-vs'
,
'
TestCase/billing
'
,
f
'--html=./report.html'
])
#allure报告一直生成不了,改用pytest自带报告
finally
:
test_env_conn
.
close_db
()
#关闭数据库链接
...
...
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