forked from salabs/TestArchiver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
176 lines (151 loc) · 5.21 KB
/
Copy pathpyproject.toml
File metadata and controls
176 lines (151 loc) · 5.21 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
name = "testarchiver"
dynamic = ["version"]
description = "Tools for serialising test results to SQL database"
authors = [
{name = "Tommi Oinonen", email = "tommi.oinonen@siili.com"},
]
dependencies = [
"psycopg2-binary>=2.8.5",
]
requires-python = ">=3.9"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Topic :: Software Development :: Testing",
]
[project.urls]
Homepage = "https://github.com/salabs/TestArchiver"
Repository = "https://github.com/salabs/TestArchiver"
Issues = "https://github.com/salabs/TestArchiver/issues"
[project.scripts]
testarchiver = "test_archiver.output_parser:main"
testarchive_schematool = "test_archiver.database:main"
[tool.pdm]
distribution = true
[tool.pdm.version]
source = "scm"
write_to = "test_archiver/version.txt"
[tool.pdm.dev-dependencies]
dev = [
"pytest>=8.3.5",
"pylint>=3.2.7",
"setuptools>=75.3.2",
"pytest-cov>=6.2.1",
"robotframework==7.*",
]
[tool.pdm.scripts]
echo.help = "Echo some message"
echo.cmd = "echo"
utest.help = "Run unit tests"
utest.cmd = [
"pytest",
"--cov-report=term",
"--cov=test_archiver",
"tests/unit/",
"--junit-xml=unittest_output.xml",
]
itest.help = "Run integration tests parsing results to databases"
itest.cmd = "pytest tests/integration/"
lint = "pylint src/"
check_code.composite = [
"lint",
"utest",
"echo 'All code validations passed'",
]
# These are helpers to populate fixture archive for testing/demo purposes #
###########################################################################
# Robot fixture helpers
check_fixture_config.help = "Check fixture config json works"
check_fixture_config.cmd = "testarchive_schematool --config {args:fixture_config_sqlite.json}"
robot_fixture_run_with_listener.help = "Populate robot fixture archive using RobotListener"
robot_fixture_run_with_listener.cmd = [
"robot",
"--listener", "test_archiver.ArchiverRobotListener:{args:fixture_config_sqlite.json}",
"--pythonpath", "robot_tests/libraries:robot_tests/resources:src/",
"--outputdir", "robot_tests/listener",
"--metadata", "team:TestArchiver",
"--metadata", "series:RobotListener",
"--metadata", "series2:Fixture",
"--exclude", "sleep",
"--nostatusrc",
"--console=none",
"robot_tests/tests",
]
robot_listener_parse.help = "Populate robot fixture archive by parsing last fixture suite output"
robot_listener_parse.cmd = [
"testarchiver",
"robot_tests/listener/output.xml",
"--config {args:fixture_config_sqlite.json}",
"--repository", "TestArchiver",
"--team", "TestArchiver",
"--series", "Parser",
"--series", "Fixture",
]
robot_fixture_run.help = "Run robot fixture suite"
robot_fixture_run.cmd = [
"robot",
"--console=none",
"--pythonpath", "robot_tests/libraries:robot_tests/resources",
"--outputdir", "robot_tests/normal",
"--exclude", "sleep",
"--nostatusrc",
"robot_tests/tests",
]
robot_fixture_parse.help = "Populate robot fixture archive by parsing last fixture suite output"
robot_fixture_parse.cmd = [
"testarchiver",
"robot_tests/normal/output.xml",
"--config {args:fixture_config_sqlite.json}",
"--repository", "TestArchiver",
"--team", "TestArchiver",
"--series", "Parser",
"--series", "Fixture",
]
robot_fixture_populate.help = "Populate full robot fixture archive with 10 builds"
robot_fixture_populate.composite = [
"check_fixture_config {args:fixture_config_sqlite.json}",
"robot_fixture_run_with_listener {args:fixture_config_sqlite.json}", # Test run 1
"robot_fixture_run", # Test run 2
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 3
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 4
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 5
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 6
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 7
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 8
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 9
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"robot_fixture_run", # Test run 10
"robot_fixture_parse {args:fixture_config_sqlite.json}",
"echo 'Fixture archive populated'",
]
# Pytest fixture helpers
pytest_fixture_run.help = "Run pytest fixture"
pytest_fixture_run.cmd = "python pytest/fixture_runner.py"
pytest_fixture_parse.help = "Parse pytest fixture output"
pytest_fixture_parse.cmd = [
"testarchiver",
"pytest/pytest_fixture_output.xml",
"--format", "pytest-junit",
"--config {args:fixture_config_sqlite.json}",
"--repository", "pytest",
"--team", "TestArchiver",
"--series", "pytest",
]
pytest_fixture_populate.help = "Populate pytest fixture archive"
pytest_fixture_populate.composite = [
"pytest_fixture_run",
"pytest_fixture_parse {args:fixture_config_sqlite.json}",
]