SeldomQA / seldom

Seldom automation testing framework based on unittest

Home Page:https://seldomqa.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

【问题】confrun.py修改默认配置未生效,怎么让报告默认语言为中文

SCP-QQ opened this issue · comments

修改报告默认语言为中文没有生效
image

使用run.py报告可以变为中文
Snipaste_2023-11-29_09-50-33

你的用法不太对,参考:

  • 首先,我的目录结构如下:
>  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  # 指定用例目录
  • 生成的报告是中文的了

image

好的,多谢,解决了