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
王英豪
AutomatedTestPlatform
Commits
778ef589
Commit
778ef589
authored
Sep 30, 2022
by
王英豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置
parent
53297956
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
29 deletions
+10
-29
settings.py
AutomatedTestPlatform/settings.py
+7
-28
performance_script_view.py
...rmance_test/performance_script/performance_script_view.py
+3
-1
No files found.
AutomatedTestPlatform/settings.py
View file @
778ef589
...
...
@@ -21,12 +21,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
print
(
ENV_PROFILE
)
if
ENV_PROFILE
==
"SERVER"
:
# MQ相关配置, 使用uat环境的mq
GROUP_ID
=
'GID_prod_automated_group'
MESSAGE_MODEL
=
1
NAME_SERVER_ADDRESS
=
'http://rocketmq-uat.rd.com:9876'
TOPIC
=
'prod_publish_topic'
# 生产环境地址
# ALLOWED_HOSTS = ["172.30.100.253", "atp.rd.com", "127.0.0.1"]
ALLOWED_HOSTS
=
[
'*'
]
...
...
@@ -133,13 +127,7 @@ if ENV_PROFILE == "SERVER":
}
elif
ENV_PROFILE
==
"1"
:
print
(
"测试环境"
)
# MQ相关配置, 使用uat环境的mq
GROUP_ID
=
'GID_test_automated_group'
MESSAGE_MODEL
=
1
# NAME_SERVER_ADDRESS = 'rocketmq-dev.rd.com:9876'
# TOPIC = 'test_publish_topic'
print
(
"windows环境"
)
# 测试环境地址
ALLOWED_HOSTS
=
[
"127.0.0.1"
,
"localhost"
]
# 配置自动化脚本日志文件的存储位置
...
...
@@ -245,18 +233,11 @@ elif ENV_PROFILE == "1":
}
elif
ENV_PROFILE
==
"macOS"
:
print
(
"本地测试"
)
# MQ相关配置, 本地测试使用dev环境的mq
GROUP_ID
=
'GID_test_automated_group'
MESSAGE_MODEL
=
1
# NAME_SERVER_ADDRESS = 'http://rocketmq-dev.rd.com:9876'
# TOPIC = 'test_publish_topic'
print
(
"本地MAC测试"
)
# 测试环境地址
ALLOWED_HOSTS
=
[
"127.0.0.1"
,
"localhost"
]
# 配置自动化脚本日志文件的存储位置
WEB_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'web_log/test_log
'
)
WEB_ROOT
=
os
.
path
.
join
(
'/Users/mac/Web_Script
'
)
# 配置上传文件的存储位置
JMETER_ROOT
=
os
.
path
.
join
(
'/Users/mac/jmeter_script'
)
...
...
@@ -266,9 +247,7 @@ elif ENV_PROFILE == "macOS":
# jmeter测试报告
JMETER_REPORT
=
os
.
path
.
join
(
'/Users/mac/jmeter_report/Report'
)
JMETER_REPORT_URL
=
"/Users/mac/jmeter_report/Report "
JMETER_REPORT_URL
=
"/Users/mac/jmeter_report/Report"
# 配置上传api测试用例文件的存储位置
API_TEST_CASE_ROOT
=
os
.
path
.
join
(
BASE_DIR
)
...
...
@@ -309,7 +288,7 @@ elif ENV_PROFILE == "macOS":
'default'
:
{
'level'
:
'DEBUG'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
BASE_DIR
+
'
/all.log'
,
# 日志输出文件
'filename'
:
'/Users/mac/testPlatformLog
/all.log'
,
# 日志输出文件
'maxBytes'
:
1024
*
1024
*
30
,
# 文件大小
'backupCount'
:
5
,
# 备份份数
'formatter'
:
'standard'
,
# 使用哪种formatters日志格式
...
...
@@ -318,7 +297,7 @@ elif ENV_PROFILE == "macOS":
'error'
:
{
'level'
:
'ERROR'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
BASE_DIR
+
'
/error.log'
,
'filename'
:
'/Users/mac/testPlatformLog
/error.log'
,
'maxBytes'
:
1024
*
1024
*
30
,
'backupCount'
:
5
,
'formatter'
:
'standard'
,
...
...
@@ -332,7 +311,7 @@ elif ENV_PROFILE == "macOS":
'info'
:
{
'level'
:
'INFO'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'filename'
:
BASE_DIR
+
'
/info.log'
,
'filename'
:
'/Users/mac/testPlatformLog
/info.log'
,
'maxBytes'
:
1024
*
1024
*
5
,
'backupCount'
:
5
,
'formatter'
:
'standard'
,
...
...
automated_main/view/performance_test/performance_script/performance_script_view.py
View file @
778ef589
...
...
@@ -445,9 +445,11 @@ class PerformanceScriptReport(View):
ENV_PROFILE
=
os
.
getenv
(
"ENV"
)
if
ENV_PROFILE
==
"SERVER"
:
dirPath
=
'/
data
/jmeter_report/Report/'
dirPath
=
'/
home/quant_group/data/jmeter
/jmeter_report/Report/'
elif
ENV_PROFILE
==
"1"
:
dirPath
=
'D:/jmeter_report/Report/'
elif
ENV_PROFILE
==
"macOS"
:
dirPath
=
'/Users/mac/jmeter_report/Report/'
logger
.
info
(
'移除前test目录:
%
s'
%
os
.
listdir
(
dirPath
))
shutil
.
rmtree
(
dirPath
+
report_name
)
...
...
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