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
9988455d
Commit
9988455d
authored
Nov 29, 2022
by
王英豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化获取列表 甘特图
parent
d595ef20
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
9 deletions
+135
-9
AutomatedTestPlatform.iml
.idea/AutomatedTestPlatform.iml
+1
-0
settings.py
AutomatedTestPlatform/settings.py
+108
-0
personnel_allocation_view.py
...rogress/personnel_allocation/personnel_allocation_view.py
+19
-9
qa.cnf
qa.cnf
+7
-0
No files found.
.idea/AutomatedTestPlatform.iml
View file @
9988455d
...
...
@@ -16,6 +16,7 @@
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/tutorial-env"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/venv"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/.vscode"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7 (AutomatedTestPlatform) (2)"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
...
...
AutomatedTestPlatform/settings.py
View file @
9988455d
...
...
@@ -126,6 +126,114 @@ if ENV_PROFILE == "SERVER":
}
}
elif
ENV_PROFILE
==
"QA"
:
# 生产环境地址
ALLOWED_HOSTS
=
[
"172.16.0.82"
,
"127.0.0.1"
,
"lzyz-ui-td.liangkebang.net"
]
# ALLOWED_HOSTS = ['*']
# 配置自动化脚本日志文件的存储位置
WEB_ROOT
=
os
.
path
.
join
(
'/home/quant_group/data/Web_Script'
)
# 配置上传文件的存储位置
JMETER_ROOT
=
os
.
path
.
join
(
'/home/quant_group/data/jmeter/jmeter_script'
)
# 配置上传jmeter参数化文件的存储位置
JMETER_DATA_SET_ROOT
=
os
.
path
.
join
(
'/home/quant_group/data/jmeter/jmeter_data_set'
)
# jmeter测试报告
JMETER_REPORT
=
os
.
path
.
join
(
'/home/quant_group/data/jmeter/jmeter_report/Report'
)
JMETER_REPORT_URL
=
"/home/quant_group/data/jmeter/jmeter_report/Report"
# API测试用例上传 excel
API_TEST_CASE_ROOT
=
os
.
path
.
join
(
'/data/api_test_case_excel/'
)
# 访问资源上传的路径
WEB_URL
=
"/home/quant_group/data/Web_Script/"
CORS_ALLOWED_ORIGINS
=
(
[
'http://127.0.0.1:*'
,
'http://172.16.0.82:*'
,
'https://lzyz-ui-td.liangkebang.net'
]
)
# mysql
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.mysql'
,
'OPTIONS'
:
{
'read_default_file'
:
BASE_DIR
+
'/qa.cnf'
,
'init_command'
:
'SET foreign_key_checks = 0;'
,
'charset'
:
'utf8mb4'
,
},
}
}
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'formatters'
:
{
'simple'
:
{
'format'
:
'
%(levelname)
s
%(message)
s'
},
'standard'
:
{
'format'
:
' [
%(levelname)
s]
%(asctime)
s [
%(threadName)
s:
%(thread)
d] [
%(name)
s:
%(lineno)
d] '
'[
%(module)
s:
%(funcName)
s] -
%(message)
s'
}
},
'filters'
:
{
},
'handlers'
:
{
'default'
:
{
'level'
:
'DEBUG'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
'/home/quant_group/logs/all.log'
,
# 日志输出文件
'maxBytes'
:
1024
*
1024
*
30
,
# 文件大小
'backupCount'
:
2
,
# 备份份数
'formatter'
:
'standard'
,
# 使用哪种formatters日志格式
'encoding'
:
'utf-8'
,
},
'error'
:
{
'level'
:
'ERROR'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
'/home/quant_group/logs/error.log'
,
'maxBytes'
:
1024
*
1024
*
30
,
'backupCount'
:
2
,
'formatter'
:
'standard'
,
'encoding'
:
'utf-8'
,
},
'console'
:
{
'level'
:
'DEBUG'
,
'class'
:
'logging.StreamHandler'
,
'formatter'
:
'simple'
},
'info'
:
{
'level'
:
'INFO'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
'/home/quant_group/logs/info.log'
,
'maxBytes'
:
1024
*
1024
*
30
,
'backupCount'
:
2
,
'formatter'
:
'standard'
,
'encoding'
:
'utf-8'
,
},
},
'loggers'
:
{
'django'
:
{
'handlers'
:
[
'default'
,
'console'
],
'level'
:
'INFO'
,
'propagate'
:
False
},
'django.request'
:
{
'handlers'
:
[
'default'
,
'console'
],
'level'
:
'INFO'
,
'propagate'
:
False
,
},
'interface'
:
{
'handlers'
:
[
'default'
,
'info'
,
'console'
,
'error'
],
'level'
:
'INFO'
,
'propagate'
:
False
,
},
}
}
elif
ENV_PROFILE
==
"1"
:
print
(
"windows环境"
)
# 测试环境地址
...
...
automated_main/view/testing_progress/personnel_allocation/personnel_allocation_view.py
View file @
9988455d
...
...
@@ -23,15 +23,24 @@ class PersonnelAllocationView(View):
return
response_success
()
data
=
json
.
loads
(
body
)
TestingProgress
.
objects
.
create
(
testing_progress_title
=
data
[
'text'
],
start_date
=
data
[
'start_date'
],
end_date
=
data
[
'end_date'
],
duration
=
data
[
'duration'
],
group
=
data
[
'group'
],
parent
=
data
[
'parent'
],
testing_progress
=
data
[
'progress'
],
type
=
data
[
'color'
],
description
=
data
[
'description'
])
if
'color'
in
data
.
keys
():
TestingProgress
.
objects
.
create
(
testing_progress_title
=
data
[
'text'
],
start_date
=
data
[
'start_date'
],
end_date
=
data
[
'end_date'
],
duration
=
data
[
'duration'
],
group
=
data
[
'group'
],
parent
=
data
[
'parent'
],
testing_progress
=
data
[
'progress'
],
type
=
data
[
'color'
],
description
=
data
[
'description'
])
else
:
TestingProgress
.
objects
.
create
(
testing_progress_title
=
data
[
'text'
],
group
=
data
[
'group'
],
parent
=
data
[
'parent'
],
testing_progress
=
''
,
type
=
''
,
description
=
''
)
return
response_success
(
"创建成功"
)
...
...
@@ -108,6 +117,7 @@ class PersonnelAllocationListView(View):
"text"
:
testing_progress
.
testing_progress_title
,
"id"
:
testing_progress
.
id
,
"render"
:
render
,
"parent"
:
testing_progress
.
parent
,
"group"
:
str
(
testing_progress
.
group
),
"color"
:
testing_progress
.
type
,
"description"
:
testing_progress
.
description
...
...
qa.cnf
0 → 100644
View file @
9988455d
[client]
host = 172.16.92.55
port = 30241
user = qa
password = qatest
database = test_qa
default-character-set = utf8
\ No newline at end of file
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