Repository navigation
Expand file tree
/
Copy pathtesttool.yaml
More file actions
91 lines (87 loc) · 3.53 KB
/
Copy pathtesttool.yaml
File metadata and controls
91 lines (87 loc) · 3.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
schemaVersion: 1.0
name: pytest
nameZh: pytest自动化测试
lang: python
version: '0.1.79'
langType: INTERPRETED
description: |-
pytest是一个成熟的全功能Python测试工具,可以帮助您编写更好的程序。此测试工具允许您在TestSolar上运行pytest。
homePage: https://github.com/OpenTestSolar/testtool-python-pytest
versionFile: https://testsolar-1321258242.cos.ap-guangzhou.myqcloud.com/testtools/python/pytest/metadata.json
indexFile: https://testsolar-1321258242.cos.ap-guangzhou.myqcloud.com/testtools/stable.index.json
scaffoldRepo: https://github.com/OpenTestSolar/testtool-scaffold-pytest
defaultBaseImage: python:3.10 # 用户在 TestContainer 配置中未指定 baseImage 时的默认镜像
repository: https://github.com/OpenTestSolar/testtool-python-pytest
gitPkgUrl: https://github.com/OpenTestSolar/testtool-python-pytest.git
httpPkgUrl: https://testsolar-1321258242.cos.ap-guangzhou.myqcloud.com/testtools/python/pytest/metadata.json@stable
parameterDefs: # 用户 use 这个测试工具时可以配置的 with 参数
- name: extraArgs
value: 额外命令行参数
default: ''
desc: 额外命令行参数
inputWidget: text
- name: enableAllure
value: 是否用Allure生成报告
desc: |-
是否用[Allure](https://allurereport.org/docs/pytest/)生成报告。
> 注意:
> 1. 开启此开关后,报告数据仅来源于Allure生成的json文件。
> 2. 用户需要自己安装Pytest的[allure插件](https://pypi.org/project/allure-pytest/)。
default: 'false'
choices:
- desc: "使用Allure生成报告"
displayName: "是"
value: 'true'
- desc: "不使用Allure生成报告"
displayName: "否"
value: 'false'
inputWidget: choices
- name: enableCoverage
value: 是否生成覆盖率报告
desc: |-
是否生成覆盖率报告。
> 注意:
> 1. 开启此开关后,会采集覆盖率,并在报告中的覆盖率TAB页展示。
default: 'false'
inputWidget: switch
- name: coverageCodePackages
value: 覆盖率采集包名
default: ''
desc: |-
**覆盖率采集包名**
用于指定在代码覆盖率报告中需要保留的包名列表,多个包名用 `;` 分隔,填写相对路径。
**示例**:
```
环境变量名称: TESTSOLAR_TTP_COVERAGECODEPACKAGES
环境变量值: my_package;another_package
```
inputWidget: text
- name: ignoreEncodeBackSlash
value: 是否避免编码数据驱动中的反斜杠字符
desc: |-
默认情况下插件会基于`datadrive.encode("unicode_escape").decode()`来对用例的数据驱动进行编码
某些情况下用例数据驱动中可能会包含反斜杠,在编码后可能会导致pytest无法找到对应用例
通过开启该选项可以避免对反斜杠进行编码
default: 'false'
inputWidget: switch
- name: runAllCases
value: 单命令运行全部用例
desc: 默认情况下插件会基于解析所有方法用例来执行,通过开启该选项可以单命令运行全部用例
default: 'false'
inputWidget: switch
- name: fileExecuteMode
value: 文件执行模式
desc: 默认情况下插件会解析全部方法用例,通过开启该选项可以只执行文件级别的用例
default: 'false'
inputWidget: switch
entry:
load: "python3 /testtools/pytest/src/load.py $1"
run: "python3 /testtools/pytest/src/run.py $1"
supportOS:
- windows
- linux
- darwin
supportArch:
- amd64
- arm64
certified: true