【问题】confrun.py修改默认配置未生效,怎么让报告默认语言为中文
SCP-QQ opened this issue · comments
SCP-MG commented
虫师 commented
你的用法不太对,参考:
- 首先,我的目录结构如下:
> tree
.
├── confrun.py # 运行配置文件。
├── reports
│ ├── 2023_11_30_11_46_02_result.html
│ └── seldom_log.log
├── test_data
│ └── data.json
└── test_dir
├── __init__.py
└── test_api_sample.py
- confrun.py 配置
...
def language():
"""
setting report language
"""
return "zh-CN"
....
运行测试,必须在 confrun.py
所在目录运行。
> ls # 查看当前目录文件
confrun.py reports est_data test_dir
> seldom -p test_dir # 指定用例目录
- 生成的报告是中文的了
SCP-MG commented
好的,多谢,解决了