Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
automatedtestplatform
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
automatedtestplatform
Commits
55a299e9
Commit
55a299e9
authored
Oct 26, 2022
by
王英豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
b203ad87
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
81 deletions
+0
-81
__init__.py
automated_main/models/api_querrydiff/__init__.py
+0
-1
__init__.cpython-37.pyc
...models/api_querrydiff/__pycache__/__init__.cpython-37.pyc
+0
-0
record_opt.cpython-37.pyc
...dels/api_querrydiff/__pycache__/record_opt.cpython-37.pyc
+0
-0
api_querrydiff_task.py
automated_main/models/api_querrydiff/api_querrydiff_task.py
+0
-25
api_querrydiff_task_detail.py
..._main/models/api_querrydiff/api_querrydiff_task_detail.py
+0
-21
record_opt.py
automated_main/models/api_querrydiff/record_opt.py
+0
-34
No files found.
automated_main/models/api_querrydiff/__init__.py
deleted
100644 → 0
View file @
b203ad87
# -*- coding: utf-8 -*-
automated_main/models/api_querrydiff/__pycache__/__init__.cpython-37.pyc
deleted
100644 → 0
View file @
b203ad87
File deleted
automated_main/models/api_querrydiff/__pycache__/record_opt.cpython-37.pyc
deleted
100644 → 0
View file @
b203ad87
File deleted
automated_main/models/api_querrydiff/api_querrydiff_task.py
deleted
100644 → 0
View file @
b203ad87
# -*- coding: utf-8 -*-
from
django.db
import
models
class
QuerryDiffTask
(
models
.
Model
):
"""
回放任务
"""
task_name
=
models
.
CharField
(
"回放任务名称"
,
max_length
=
100
,
blank
=
False
,
default
=
""
)
source_env_id
=
models
.
IntegerField
(
"基准环境id"
,
blank
=
False
)
target_env_id
=
models
.
IntegerField
(
"测试环境id"
,
blank
=
False
)
log_time
=
models
.
TextField
(
"关联API用例"
,
default
=
""
)
project_id
=
models
.
IntegerField
(
"无效字段去除"
,
blank
=
False
,
null
=
True
)
simple_num
=
models
.
IntegerField
(
"单接口样本量"
,
blank
=
False
)
urls
=
models
.
JSONField
(
"指定url"
,
blank
=
True
,
null
=
True
)
opt_num
=
models
.
IntegerField
(
"运行次数"
,
default
=
0
,
null
=
True
)
status
=
models
.
IntegerField
(
"状态"
,
default
=
0
,
null
=
True
)
created_name
=
models
.
CharField
(
"创建人"
,
max_length
=
255
,
blank
=
True
,
default
=
""
,
null
=
True
)
created_time
=
models
.
DateTimeField
(
"创建时间"
,
auto_now_add
=
True
)
def
__str__
(
self
):
return
self
.
task_name
automated_main/models/api_querrydiff/api_querrydiff_task_detail.py
deleted
100644 → 0
View file @
b203ad87
# -*- coding: utf-8 -*-
from
django.db
import
models
from
automated_main.models.api_querrydiff.api_querrydiff_task
import
QuerryDiffTask
class
QuerryDiffTaskItems
(
models
.
Model
):
"""
回放任务明细
"""
task_id
=
models
.
ForeignKey
(
QuerryDiffTask
,
on_delete
=
models
.
CASCADE
)
api_url
=
models
.
CharField
(
"请求地址"
,
max_length
=
255
,
blank
=
False
)
param
=
models
.
TextField
(
"关联API用例"
,
default
=
None
)
result
=
models
.
CharField
(
"运行结果"
,
blank
=
True
,
null
=
True
)
req_count
=
models
.
BigIntegerField
(
"线上运行次数"
,
default
=
0
,
null
=
True
)
status
=
models
.
IntegerField
(
"状态"
,
default
=
0
,
null
=
True
)
method
=
models
.
IntegerField
(
"请求方式"
,
blank
=
False
)
created_time
=
models
.
DateTimeField
(
"创建时间"
,
auto_now_add
=
True
)
def
__str__
(
self
):
return
self
.
task_id
automated_main/models/api_querrydiff/record_opt.py
deleted
100644 → 0
View file @
b203ad87
# -*- coding: utf-8 -*-
import
records
import
traceback
class
DbRecordOpt
:
def
__init__
(
self
):
try
:
self
.
con
=
records
.
Database
(
'mysql+pymysql://root:admin666@172.30.100.253:3306/test_qa'
)
except
:
print
(
traceback
.
print_exc
())
raise
def
querry_excute
(
self
,
order
):
return
self
.
con
.
query
(
order
)
.
as_dict
()
def
write_excute
(
self
,
order
):
return
self
.
con
.
query
(
order
)
def
batch
(
self
,
order
,
param
):
return
self
.
con
.
bulk_query
(
order
,
param
)
def
tranc_excute
(
self
,
order_list
):
tr
=
self
.
con
.
transaction
()
try
:
for
i
in
order_list
:
self
.
con
.
query
(
i
)
tr
.
commit
()
return
0
except
:
tr
.
rollback
()
return
1
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