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
8c9aabe9
Commit
8c9aabe9
authored
Aug 07, 2024
by
王超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
23cf6744
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
debug_talk.py
debug_talk.py
+11
-6
requestments.txt
requestments.txt
+5
-2
使用说明.txt
使用说明.txt
+1
-1
接口自动化测试框架规则.txt
接口自动化测试框架规则.txt
+2
-2
No files found.
debug_talk.py
View file @
8c9aabe9
...
...
@@ -4,6 +4,7 @@ import time
import
datetime
from
common.parameters_util
import
read_csv_file
,
read_testcase_file
from
common.yaml_util
import
read_extract_file
,
read_config_file
from
datetime
import
datetime
...
...
@@ -15,11 +16,15 @@ class DubugTalk:
# 获取时间戳
def
get_time_stamp
(
self
):
now
=
datetime
.
datetime
.
now
()
timestamp
=
now
.
timestamp
()
return
timestamp
# print("当前时间:",now)
# print("时间戳:",timestamp)
now
=
datetime
.
now
()
.
timestamp
()
# timestamp = now.timestamp()
# print(now)
return
now
def
get_data
(
self
):
# 获取当前日期
current_date
=
datetime
.
now
()
.
date
()
return
current_date
#获取extract.yaml文件中的值
def
get_extract_data
(
self
,
node_name
):
...
...
@@ -63,4 +68,4 @@ if __name__ == '__main__':
# re1 = read_testcase_file('/testcase/EngineeringManagement/create_project100.yml')
# print(type(re),re)
# print(re1)
DubugTalk
()
.
get_
project_path2
()
DubugTalk
()
.
get_
time_stamp
()
requestments.txt
View file @
8c9aabe9
...
...
@@ -3,4 +3,8 @@ pytest-html
pytest-xdist
pytest-ordering
pytest-rerunfailures
allure-pytest
\ No newline at end of file
allure-pytest
PyYAML
PyMySQL
pyodbc
requests
使用说明.txt
View file @
8c9aabe9
框架:python+pytest+allure
安装插件:执行
pip install -r
requestments.txt
安装插件:执行 requestments.txt
执行文件:all_test.py
其他文件:
common:全局方法
...
...
接口自动化测试框架规则.txt
View file @
8c9aabe9
...
...
@@ -61,7 +61,7 @@
7.数据驱动:关键字parameters,使用csv文件存储数据
yaml写法:
parameters:
name1-name2: data/get_caate_node.csv
name1-name2: data/get_caate_node.csv
csv文件写法:
name1,name2
创建工程1,test88
...
...
@@ -84,7 +84,7 @@
1)上传文件:testcase/A3_9_API_Interconnection/import_apilist.yml,导入api接口
testcase/A3_9_API_Interconnection/create_tunnel.yml,导入变量
2)数据驱动:testcase/3_VariableManagement/creat_io_variable.yml
3)断言:testcase/
3_VariableManagement/creat_io_variable
.yml
3)断言:testcase/
A3_9_API_Interconnection/post_api
.yml
testcase/1_EngineeringManagement/data_check(data_clear).yml.yml
...
...
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