Commit 778ef589 authored by 王英豪's avatar 王英豪

修改配置

parent 53297956
......@@ -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',
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment