Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CMS2.0_API_AUTOMATION_TEST
Project
Project
Details
Activity
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
王超
CMS2.0_API_AUTOMATION_TEST
Commits
77aecc2e
Commit
77aecc2e
authored
Dec 19, 2024
by
王超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改read_string_var.csv文件中,日期变量(aa14,aa16)预期结果;
2.修改data_check(data_recovery).yml文件,在调用相关查询接口前,先调用获取工程信息接口,初始化工程信息;
parent
2167c216
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
workspace.xml
.idea/workspace.xml
+0
-0
read_string_var.csv
data/VariableManagement/read_string_var.csv
+3
-3
data_check(data_recovery).yml
...ase/1_EngineeringManagement/data_check(data_recovery).yml
+12
-0
test_engineering_run.py
testcase/1_EngineeringManagement/test_engineering_run.py
+9
-1
No files found.
.idea/workspace.xml
View file @
77aecc2e
This diff is collapsed.
Click to expand it.
data/VariableManagement/read_string_var.csv
View file @
77aecc2e
...
...
@@ -2,6 +2,6 @@ title,name,value
io-字符串-A12,A12,#-~()%
内部-字符串-aa12,aa12,#-~()%
内部-宽字符串-aa13,aa13,#-~()%
内部-日期-aa14,aa14,2023
/10/
20
内部-日期-aa14,aa14,2023
-10-
20
内部-时间-aa15,aa15,18:40:55
内部-日期时间-aa16,aa16,2023/10/20 18:40:55
\ No newline at end of file
内部-日期时间-aa16,aa16,2023-10-20 18:40:55
\ No newline at end of file
testcase/1_EngineeringManagement/data_check(data_recovery).yml
View file @
77aecc2e
-
name
:
获取工程信息
#在调用下方的查询接口前,先调用获取工程信息接口,进行工程数据的初始化
base_url
:
${get_base_url(cms_url)}
request
:
url
:
/api/v1/project/${get_extract_data(project_id)}/info
method
:
get
extract
:
x_project
:
identifier
project_name
:
name
validate
:
-
equals
:
{
status_code
:
200
}
-
contains
:
id
-
name
:
查用户管理信息(还原后)
base_url
:
${get_base_url(cms_url)}
request
:
...
...
testcase/1_EngineeringManagement/test_engineering_run.py
View file @
77aecc2e
import
os.path
import
allure
import
pytest
import
time
from
common.parameters_util
import
read_testcase_file
from
common.requests_util
import
RequestUtil
from
pathlib
import
Path
@allure.epic
(
"CMS2.0"
)
@allure.feature
(
"工程管理"
)
class
TestCreat
():
# 获取当前文件的Path对象
current_file
=
Path
(
__file__
)
# 获取当前文件所在的目录
current_dir
=
current_file
.
parent
@allure.story
(
"接口名称:重命名工程"
)
@pytest.mark.parametrize
(
'caseinfo'
,
read_testcase_file
(
'/testcase/1_EngineeringManagement/rename_project.yml'
))
def
test_rename_project
(
self
,
caseinfo
):
...
...
@@ -182,7 +191,6 @@ class TestCreat():
RequestUtil
()
.
analysis_yaml
(
caseinfo
)
time
.
sleep
(
2
)
@allure.story
(
"接口名称:获取鉴权码"
)
@pytest.mark.parametrize
(
'caseinfo'
,
read_testcase_file
(
'/testcase/1_EngineeringManagement/get_requesttoken.yml'
))
def
test_get_requesttoken
(
self
,
caseinfo
):
...
...
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