robotframework-testdoc 0.2.7__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/.gitignore +6 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/PKG-INFO +38 -10
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/README.md +24 -2
- robotframework_testdoc-0.3.1/pyproject.toml +94 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v2/jinja_template_03.html +70 -24
- robotframework_testdoc-0.2.7/.github/workflows/build.yml +0 -70
- robotframework_testdoc-0.2.7/.github/workflows/release.yml +0 -64
- robotframework_testdoc-0.2.7/atest/config/config_with_colors.toml +0 -16
- robotframework_testdoc-0.2.7/atest/config/testdoc.toml +0 -10
- robotframework_testdoc-0.2.7/atest/config_pyproject/example_pyproject.toml +0 -32
- robotframework_testdoc-0.2.7/atest/test_cli.py +0 -34
- robotframework_testdoc-0.2.7/atest/test_cli.robot +0 -12
- robotframework_testdoc-0.2.7/docs/html_v1_common.png +0 -0
- robotframework_testdoc-0.2.7/docs/html_v2_root.png +0 -0
- robotframework_testdoc-0.2.7/docs/html_v2_suitefile.png +0 -0
- robotframework_testdoc-0.2.7/docs/style_blue.png +0 -0
- robotframework_testdoc-0.2.7/docs/style_dark.png +0 -0
- robotframework_testdoc-0.2.7/docs/style_robot.png +0 -0
- robotframework_testdoc-0.2.7/pyproject.toml +0 -54
- robotframework_testdoc-0.2.7/setup.cfg +0 -4
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/PKG-INFO +0 -273
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/SOURCES.txt +0 -45
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/dependency_links.txt +0 -1
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/entry_points.txt +0 -2
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/requires.txt +0 -4
- robotframework_testdoc-0.2.7/src/robotframework_testdoc.egg-info/top_level.txt +0 -1
- robotframework_testdoc-0.2.7/src/testdoc/__init__.py +0 -0
- robotframework_testdoc-0.2.7/src/testdoc/__main__.py +0 -4
- robotframework_testdoc-0.2.7/src/testdoc/cli.py +0 -101
- robotframework_testdoc-0.2.7/src/testdoc/helper/cliargs.py +0 -100
- robotframework_testdoc-0.2.7/src/testdoc/helper/datetimeconverter.py +0 -5
- robotframework_testdoc-0.2.7/src/testdoc/helper/logger.py +0 -9
- robotframework_testdoc-0.2.7/src/testdoc/helper/pathconverter.py +0 -30
- robotframework_testdoc-0.2.7/src/testdoc/helper/toml_reader.py +0 -50
- robotframework_testdoc-0.2.7/src/testdoc/html/rendering/render.py +0 -44
- robotframework_testdoc-0.2.7/src/testdoc/html/themes/__init__.py +0 -0
- robotframework_testdoc-0.2.7/src/testdoc/html/themes/theme_config.py +0 -45
- robotframework_testdoc-0.2.7/src/testdoc/html/themes/themes.py +0 -66
- robotframework_testdoc-0.2.7/src/testdoc/parser/modifier/sourceprefixmodifier.py +0 -110
- robotframework_testdoc-0.2.7/src/testdoc/parser/modifier/suitefilemodifier.py +0 -99
- robotframework_testdoc-0.2.7/src/testdoc/parser/testcaseparser.py +0 -176
- robotframework_testdoc-0.2.7/src/testdoc/parser/testsuiteparser.py +0 -141
- robotframework_testdoc-0.2.7/src/testdoc/testdoc.py +0 -16
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/LICENSE +0 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/src/testdoc/default.toml +0 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/src/testdoc/html/images/robotframework.svg +0 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v1/jinja_template_01.html +0 -0
- {robotframework_testdoc-0.2.7 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v1/jinja_template_02.html +0 -0
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-testdoc
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts.
|
|
5
|
-
Author-email: Marvin Klerx <marvinklerx20@gmail.com>
|
|
6
|
-
License: Apache-2.0
|
|
7
5
|
Project-URL: Repository, https://github.com/MarvKler/robotframework-testdoc
|
|
8
6
|
Project-URL: Issues, https://github.com/MarvKler/robotframework-testdoc/issues
|
|
7
|
+
Author-email: Marvin Klerx <marvinklerx20@gmail.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Classifier: Development Status :: 4 - Beta
|
|
10
11
|
Classifier: Programming Language :: Python
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Requires-Python: >=3.
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
License-File: LICENSE
|
|
15
|
+
Requires-Python: >=3.10
|
|
18
16
|
Requires-Dist: click
|
|
19
|
-
Requires-Dist: robotframework
|
|
20
17
|
Requires-Dist: jinja2
|
|
18
|
+
Requires-Dist: pydantic
|
|
19
|
+
Requires-Dist: robotframework
|
|
21
20
|
Requires-Dist: tomli
|
|
22
|
-
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: hatch; extra == 'dev'
|
|
23
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
24
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
26
|
+
Requires-Dist: robotframework-robocop; extra == 'dev'
|
|
27
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
23
29
|
|
|
24
30
|
# Robot Framework TestDoc
|
|
25
31
|
|
|
@@ -104,6 +110,20 @@ testdoc --hide-source tests/ TestDocumentation.html
|
|
|
104
110
|
testdoc --hide-keywords tests/ TestDocumentation.html
|
|
105
111
|
```
|
|
106
112
|
|
|
113
|
+
## Visualization of Keywords
|
|
114
|
+
|
|
115
|
+
Keywords are visualized in a specific design and to replicate the robot framework test case structure (model) as best as possible.
|
|
116
|
+
|
|
117
|
+
### User / Library Keywords called in a Test Case Body
|
|
118
|
+
|
|
119
|
+
This view does actually replicate the robot framework suite file with the ``*** Test Cases ***`` section, the ``Test Case Name`` and the ``Test Case Body``.
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
### User Keyword defined in a Test Suite
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
107
127
|
## Robot Framework Tags
|
|
108
128
|
The commandline arguments ``include`` & ``exclude`` have more or less the same functionality like in the known ``robot ...`` command.
|
|
109
129
|
You can decide to weither include and / or exclude specific test cases into the test documentation.
|
|
@@ -161,6 +181,8 @@ border_color = "#CCCCCC"
|
|
|
161
181
|
text_color = "#CCCCCC"
|
|
162
182
|
title_color = "#00ffb9"
|
|
163
183
|
robot_icon = "#00ffb9"
|
|
184
|
+
code_area_background = "#303030"
|
|
185
|
+
code_area_foreground = "#f1f1f1"
|
|
164
186
|
```
|
|
165
187
|
|
|
166
188
|
## HTML Template Selection
|
|
@@ -172,7 +194,7 @@ These template can be configured via ``cli arguments`` or within a ``.toml confi
|
|
|
172
194
|
|
|
173
195
|
- v2
|
|
174
196
|
|
|
175
|
-
### Available HTML Templates
|
|
197
|
+
### Available HTML Templates - NOT RECOMMENDED
|
|
176
198
|
|
|
177
199
|
You can choose one of the following designs:
|
|
178
200
|
- v1
|
|
@@ -253,6 +275,8 @@ border_color = "#CCCCCC"
|
|
|
253
275
|
text_color = "#CCCCCC"
|
|
254
276
|
title_color = "#00ffb9"
|
|
255
277
|
robot_icon = "#00ffb9"
|
|
278
|
+
code_area_background = "#303030"
|
|
279
|
+
code_area_foreground = "#f1f1f1"
|
|
256
280
|
```
|
|
257
281
|
|
|
258
282
|
> [!TIP]
|
|
@@ -271,3 +295,7 @@ robot_icon = "#00ffb9"
|
|
|
271
295
|
#### Robot / Default
|
|
272
296
|
|
|
273
297
|

|
|
298
|
+
|
|
299
|
+
## Contribution & Development
|
|
300
|
+
|
|
301
|
+
See [Development.md](./DEVELOPMENT.md) for more information about contributing & developing this library.
|
|
@@ -81,6 +81,20 @@ testdoc --hide-source tests/ TestDocumentation.html
|
|
|
81
81
|
testdoc --hide-keywords tests/ TestDocumentation.html
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
## Visualization of Keywords
|
|
85
|
+
|
|
86
|
+
Keywords are visualized in a specific design and to replicate the robot framework test case structure (model) as best as possible.
|
|
87
|
+
|
|
88
|
+
### User / Library Keywords called in a Test Case Body
|
|
89
|
+
|
|
90
|
+
This view does actually replicate the robot framework suite file with the ``*** Test Cases ***`` section, the ``Test Case Name`` and the ``Test Case Body``.
|
|
91
|
+
|
|
92
|
+

|
|
93
|
+
|
|
94
|
+
### User Keyword defined in a Test Suite
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
84
98
|
## Robot Framework Tags
|
|
85
99
|
The commandline arguments ``include`` & ``exclude`` have more or less the same functionality like in the known ``robot ...`` command.
|
|
86
100
|
You can decide to weither include and / or exclude specific test cases into the test documentation.
|
|
@@ -138,6 +152,8 @@ border_color = "#CCCCCC"
|
|
|
138
152
|
text_color = "#CCCCCC"
|
|
139
153
|
title_color = "#00ffb9"
|
|
140
154
|
robot_icon = "#00ffb9"
|
|
155
|
+
code_area_background = "#303030"
|
|
156
|
+
code_area_foreground = "#f1f1f1"
|
|
141
157
|
```
|
|
142
158
|
|
|
143
159
|
## HTML Template Selection
|
|
@@ -149,7 +165,7 @@ These template can be configured via ``cli arguments`` or within a ``.toml confi
|
|
|
149
165
|
|
|
150
166
|
- v2
|
|
151
167
|
|
|
152
|
-
### Available HTML Templates
|
|
168
|
+
### Available HTML Templates - NOT RECOMMENDED
|
|
153
169
|
|
|
154
170
|
You can choose one of the following designs:
|
|
155
171
|
- v1
|
|
@@ -230,6 +246,8 @@ border_color = "#CCCCCC"
|
|
|
230
246
|
text_color = "#CCCCCC"
|
|
231
247
|
title_color = "#00ffb9"
|
|
232
248
|
robot_icon = "#00ffb9"
|
|
249
|
+
code_area_background = "#303030"
|
|
250
|
+
code_area_foreground = "#f1f1f1"
|
|
233
251
|
```
|
|
234
252
|
|
|
235
253
|
> [!TIP]
|
|
@@ -247,4 +265,8 @@ robot_icon = "#00ffb9"
|
|
|
247
265
|
|
|
248
266
|
#### Robot / Default
|
|
249
267
|
|
|
250
|
-

|
|
268
|
+

|
|
269
|
+
|
|
270
|
+
## Contribution & Development
|
|
271
|
+
|
|
272
|
+
See [Development.md](./DEVELOPMENT.md) for more information about contributing & developing this library.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "robotframework-testdoc"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Marvin Klerx", email = "marvinklerx20@gmail.com" }
|
|
13
|
+
]
|
|
14
|
+
license = { text = "Apache-2.0" }
|
|
15
|
+
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Programming Language :: Python",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12"
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
dependencies = [
|
|
25
|
+
"click",
|
|
26
|
+
"robotframework",
|
|
27
|
+
"jinja2",
|
|
28
|
+
"tomli",
|
|
29
|
+
"pydantic"
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"hatch",
|
|
35
|
+
"ruff",
|
|
36
|
+
"pytest",
|
|
37
|
+
"pre-commit",
|
|
38
|
+
"mypy",
|
|
39
|
+
"robotframework-robocop"
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
testdoc = "testdoc.cli:main"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Repository = "https://github.com/MarvKler/robotframework-testdoc"
|
|
47
|
+
Issues = "https://github.com/MarvKler/robotframework-testdoc/issues"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
require-runtime-dependencies = true
|
|
52
|
+
only-include = ["src/testdoc"]
|
|
53
|
+
sources = ["src"]
|
|
54
|
+
include = [
|
|
55
|
+
"src/testdoc/html/images/*.svg",
|
|
56
|
+
"src/testdoc/html/templates/**/*.html",
|
|
57
|
+
"src/testdoc/default.toml",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[tool.hatch.build.targets.sdist]
|
|
61
|
+
include = [
|
|
62
|
+
"src/testdoc/html/images/*.svg",
|
|
63
|
+
"src/testdoc/html/templates/**/*.html",
|
|
64
|
+
"src/testdoc/default.toml",
|
|
65
|
+
"README.md",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[tool.hatch.version]
|
|
69
|
+
path = "src/testdoc/__about__.py"
|
|
70
|
+
|
|
71
|
+
[tool.hatch.build]
|
|
72
|
+
dev-mode-dirs = ["src"]
|
|
73
|
+
|
|
74
|
+
[tool.hatch.envs.types]
|
|
75
|
+
extra-dependencies = [
|
|
76
|
+
"mypy>=1.0.0",
|
|
77
|
+
]
|
|
78
|
+
[tool.hatch.envs.types.scripts]
|
|
79
|
+
check = "mypy --install-types --non-interactive {args:src/Tables tests}"
|
|
80
|
+
|
|
81
|
+
[tool.hatch.envs.dev]
|
|
82
|
+
dependencies = [
|
|
83
|
+
"ruff",
|
|
84
|
+
"pytest"
|
|
85
|
+
]
|
|
86
|
+
[tool.hatch.envs.dev.scripts]
|
|
87
|
+
lint = "ruff check ."
|
|
88
|
+
atest = "pytest atest/"
|
|
89
|
+
|
|
90
|
+
[tool.ruff]
|
|
91
|
+
line-length = 150
|
|
92
|
+
lint.select = ["E", "F"] # Pyflakes & pycodestyle
|
|
93
|
+
lint.ignore = ["E722"]
|
|
94
|
+
exclude = ["build", "dist"]
|
|
@@ -16,35 +16,53 @@
|
|
|
16
16
|
{% macro render_test_cases(suite) %}
|
|
17
17
|
{% if suite.tests %}
|
|
18
18
|
<div class="suite-header mb-3 p-3" data-suite-id="{{ suite.id }}" style="border: 1px solid {{ colors.border_color }}; border-radius: .375rem; background: {{ colors.inner_color }};">
|
|
19
|
-
<div><strong>
|
|
19
|
+
<div><strong>Test Suite Details:</strong></div>
|
|
20
|
+
<hr>
|
|
20
21
|
<table style="width: 100%; border-collapse: collapse;">
|
|
21
22
|
<tr>
|
|
22
|
-
<td style="width:
|
|
23
|
+
<td style="width: 15%; font-weight: bold;">📁 Suite Name:</td>
|
|
23
24
|
<td style="text-align: left;">{{ suite.name }}</td>
|
|
24
25
|
</tr>
|
|
25
26
|
{% if not suite.is_folder %}
|
|
26
27
|
<tr>
|
|
27
|
-
<td style="width:
|
|
28
|
+
<td style="width: 15%; font-weight: bold;">📄 File Name:</td>
|
|
28
29
|
<td style="text-align: left;">{{ suite.filename }}</td>
|
|
29
30
|
</tr>
|
|
30
31
|
{% endif %}
|
|
31
32
|
<tr>
|
|
32
|
-
<td style="width:
|
|
33
|
+
<td style="width: 15%; font-weight: bold;">📊 Number of Tests:</td>
|
|
33
34
|
<td style="text-align: left;">{{ suite.num_tests }}</td>
|
|
34
35
|
</tr>
|
|
35
36
|
{% if suite.doc is not none %}
|
|
36
37
|
<tr>
|
|
37
|
-
<td style="width:
|
|
38
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">📝 Docs:</td>
|
|
38
39
|
<td style="text-align: left;">{{ suite.doc }}</td>
|
|
39
40
|
</tr>
|
|
40
41
|
{% endif %}
|
|
42
|
+
{% if suite.source is not none %}
|
|
43
|
+
<tr>
|
|
44
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">🔗 Source:</td>
|
|
45
|
+
<td style="text-align: left;">
|
|
46
|
+
<a href="{{ suite.source }}" target="_blank">{{ suite.source }}</a>
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
{% endif %}
|
|
41
50
|
{% if suite.metadata is not none %}
|
|
42
51
|
<tr>
|
|
43
|
-
<td style="width:
|
|
52
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">⚙️ Metadata:</td>
|
|
44
53
|
<td style="text-align: left;">{{ suite.metadata }}</td>
|
|
45
54
|
</tr>
|
|
46
55
|
{% endif %}
|
|
47
56
|
</table>
|
|
57
|
+
{% if suite.user_keywords is not none %}
|
|
58
|
+
<br>
|
|
59
|
+
<div class="keywords-block keywords-block-div"><strong>🔑 Suite User Keywords:</strong></div>
|
|
60
|
+
{% if suite.user_keywords %}
|
|
61
|
+
<pre class="keywords-block keywords-block-pre">
|
|
62
|
+
*** Keywords ***
|
|
63
|
+
{{ suite.user_keywords | join('\n ') }}</pre>
|
|
64
|
+
{% endif %}
|
|
65
|
+
{% endif %}
|
|
48
66
|
</div>
|
|
49
67
|
{% for test in suite.tests %}
|
|
50
68
|
<div class="card mb-3 test-card" data-suite-id="{{ suite.id }}">
|
|
@@ -57,6 +75,8 @@
|
|
|
57
75
|
</div>
|
|
58
76
|
<div id="collapse-{{ suite.id }}-{{ loop.index }}" class="collapse">
|
|
59
77
|
<div class="card-body">
|
|
78
|
+
<div class="keywords-block"><strong>Test Case Details:</strong></div>
|
|
79
|
+
<hr class="keywords-block">
|
|
60
80
|
<table style="width: 100%; border-collapse: collapse;">
|
|
61
81
|
{% set has_info = test.doc is not none or test.source is not none or test.tags is not none or test.keywords is not none %}
|
|
62
82
|
{% if test.doc is not none %}
|
|
@@ -67,7 +87,7 @@
|
|
|
67
87
|
{% endif %}
|
|
68
88
|
{% if test.source is not none %}
|
|
69
89
|
<tr>
|
|
70
|
-
<td style="width:
|
|
90
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">🔗 Source:</td>
|
|
71
91
|
<td style="text-align: left;">
|
|
72
92
|
<a href="{{ test.source }}" target="_blank">{{ test.source }}</a>
|
|
73
93
|
</td>
|
|
@@ -75,30 +95,31 @@
|
|
|
75
95
|
{% endif %}
|
|
76
96
|
{% if test.tags is not none %}
|
|
77
97
|
<tr>
|
|
78
|
-
<td style="width:
|
|
98
|
+
<td style="width: 15%; font-weight: bold;">🏷 Tags:</td>
|
|
79
99
|
<td style="text-align: left;">
|
|
80
100
|
{{ test.tags | join(', ') }}
|
|
81
101
|
</td>
|
|
82
102
|
</tr>
|
|
83
103
|
{% endif %}
|
|
84
|
-
{% if test.keywords is not none %}
|
|
85
|
-
<tr>
|
|
86
|
-
<td style="width: 10%; font-weight: bold; vertical-align: top;">🔑 Keywords:</td>
|
|
87
|
-
<td style="text-align: left;">
|
|
88
|
-
{% if test.keywords %}
|
|
89
|
-
<pre>- {{ test.keywords | join('\n- ') }}</pre>
|
|
90
|
-
{% endif %}
|
|
91
|
-
</td>
|
|
92
|
-
</tr>
|
|
93
|
-
{% endif %}
|
|
94
104
|
{% if not has_info %}
|
|
95
105
|
<tr>
|
|
96
|
-
<td class="info-msg" style="width:
|
|
106
|
+
<td class="info-msg" style="width: 15%; vertical-align: top; text-align: center;">
|
|
97
107
|
No Details Available / Enabled !
|
|
98
108
|
</td>
|
|
99
109
|
</tr>
|
|
100
110
|
{% endif %}
|
|
101
111
|
</table>
|
|
112
|
+
{% if test.keywords is not none %}
|
|
113
|
+
<br>
|
|
114
|
+
<div class="keywords-block keywords-block-div"><strong>🔑 Keywords / Test Case Body:</strong></div>
|
|
115
|
+
{% if test.keywords %}
|
|
116
|
+
<pre class="keywords-block keywords-block-pre">
|
|
117
|
+
*** Test Cases ***
|
|
118
|
+
{{ test.name }}
|
|
119
|
+
{{ test.keywords | join('\n ') }}
|
|
120
|
+
</pre>
|
|
121
|
+
{% endif %}
|
|
122
|
+
{% endif %}
|
|
102
123
|
</div>
|
|
103
124
|
</div>
|
|
104
125
|
</div>
|
|
@@ -106,25 +127,34 @@
|
|
|
106
127
|
{% endif %}
|
|
107
128
|
{% if suite.sub_suites %}
|
|
108
129
|
<div class="suite-header mb-3 p-3" data-suite-id="{{ suite.id }}" style="border: 1px solid {{ colors.border_color }}; border-radius: .375rem; background: {{ colors.inner_color }};">
|
|
109
|
-
<div><strong>
|
|
130
|
+
<div><strong>Parent Test Suite Details:</strong></div>
|
|
131
|
+
<hr>
|
|
110
132
|
<table style="width: 100%; border-collapse: collapse;">
|
|
111
133
|
<tr>
|
|
112
|
-
<td style="width:
|
|
134
|
+
<td style="width: 15%; font-weight: bold;">📁 Suite Name:</td>
|
|
113
135
|
<td style="text-align: left;">{{ suite.name }}</td>
|
|
114
136
|
</tr>
|
|
115
137
|
<tr>
|
|
116
|
-
<td style="width:
|
|
138
|
+
<td style="width: 15%; font-weight: bold;">📊 Number of Tests:</td>
|
|
117
139
|
<td style="text-align: left;">{{ suite.total_tests }}</td>
|
|
118
140
|
</tr>
|
|
119
141
|
{% if suite.doc is not none %}
|
|
120
142
|
<tr>
|
|
121
|
-
<td style="width:
|
|
143
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">📝 Docs:</td>
|
|
122
144
|
<td style="text-align: left;">{{ suite.doc }}</td>
|
|
123
145
|
</tr>
|
|
124
146
|
{% endif %}
|
|
147
|
+
{% if suite.source is not none %}
|
|
148
|
+
<tr>
|
|
149
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">🔗 Source:</td>
|
|
150
|
+
<td style="text-align: left;">
|
|
151
|
+
<a href="{{ suite.source }}" target="_blank">{{ suite.source }}</a>
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
{% endif %}
|
|
125
155
|
{% if suite.metadata is not none %}
|
|
126
156
|
<tr>
|
|
127
|
-
<td style="width:
|
|
157
|
+
<td style="width: 15%; font-weight: bold; vertical-align: top;">⚙️ Metadata:</td>
|
|
128
158
|
<td style="text-align: left;">{{ suite.metadata }}</td>
|
|
129
159
|
</tr>
|
|
130
160
|
{% endif %}
|
|
@@ -142,6 +172,7 @@
|
|
|
142
172
|
<meta charset="UTF-8">
|
|
143
173
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
144
174
|
<title>Robot Framework - Test Documentation</title>
|
|
175
|
+
<link rel="icon" href="https://commons.wikimedia.org/wiki/Special:FilePath/Robot_Framework_svg_icon.svg" type="image/svg+xml">
|
|
145
176
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
146
177
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
147
178
|
<style>
|
|
@@ -209,6 +240,21 @@
|
|
|
209
240
|
.sidebar { min-width: 120px; max-width: 180px; }
|
|
210
241
|
.main-content { padding: 10px; }
|
|
211
242
|
}
|
|
243
|
+
.keywords-block,
|
|
244
|
+
.keywords-block pre {
|
|
245
|
+
color: {{ colors.text_color }};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.keywords-block-div {
|
|
249
|
+
margin-bottom: 8px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.keywords-block-pre {
|
|
253
|
+
background-color: {{ colors.code_area_background }};
|
|
254
|
+
color: {{ colors.code_area_foreground }};
|
|
255
|
+
border-radius: 8px;
|
|
256
|
+
padding: 12px 14px;
|
|
257
|
+
}
|
|
212
258
|
</style>
|
|
213
259
|
</head>
|
|
214
260
|
<body>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
name: Build & Test Python Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
tags-ignore:
|
|
8
|
-
- 'v*.*.*'
|
|
9
|
-
paths:
|
|
10
|
-
- '**.yml'
|
|
11
|
-
- '**.py'
|
|
12
|
-
- '**.html'
|
|
13
|
-
- pyproject.toml
|
|
14
|
-
pull_request:
|
|
15
|
-
paths:
|
|
16
|
-
- '**.yml'
|
|
17
|
-
- '**.py'
|
|
18
|
-
- '**.html'
|
|
19
|
-
- pyproject.toml
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
code-quality:
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout Repository
|
|
26
|
-
uses: actions/checkout@v3
|
|
27
|
-
|
|
28
|
-
- name: Set up Python
|
|
29
|
-
uses: actions/setup-python@v4
|
|
30
|
-
with:
|
|
31
|
-
python-version: '3.12'
|
|
32
|
-
|
|
33
|
-
- name: Install Build Dependencies
|
|
34
|
-
run: |
|
|
35
|
-
python -m pip install --upgrade pip
|
|
36
|
-
pip install build ruff pytest
|
|
37
|
-
|
|
38
|
-
- name: Lint with Ruff
|
|
39
|
-
run: ruff check .
|
|
40
|
-
|
|
41
|
-
test-build:
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
strategy:
|
|
44
|
-
matrix:
|
|
45
|
-
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
46
|
-
steps:
|
|
47
|
-
- name: Checkout Repository
|
|
48
|
-
uses: actions/checkout@v4
|
|
49
|
-
|
|
50
|
-
- name: Set up Python
|
|
51
|
-
uses: actions/setup-python@v5
|
|
52
|
-
with:
|
|
53
|
-
python-version: ${{ matrix.python-version }}
|
|
54
|
-
|
|
55
|
-
- name: Install Build Dependencies
|
|
56
|
-
run: |
|
|
57
|
-
python -m pip install --upgrade pip
|
|
58
|
-
pip install build ruff pytest
|
|
59
|
-
|
|
60
|
-
- name: Build Package
|
|
61
|
-
run: python -m build
|
|
62
|
-
|
|
63
|
-
- name: Test CLI Command
|
|
64
|
-
run: |
|
|
65
|
-
pip install .
|
|
66
|
-
testdoc --help
|
|
67
|
-
|
|
68
|
-
- name: Run Unit Tests
|
|
69
|
-
run: pytest atest/
|
|
70
|
-
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
name: Release on Tag
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- 'v*.*.*'
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: write
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
release:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout Repository
|
|
17
|
-
uses: actions/checkout@v3
|
|
18
|
-
|
|
19
|
-
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@v4
|
|
21
|
-
with:
|
|
22
|
-
python-version: '3.12'
|
|
23
|
-
|
|
24
|
-
- name: Install Dependencies
|
|
25
|
-
run: |
|
|
26
|
-
python -m pip install --upgrade pip
|
|
27
|
-
pip install build twine tomli
|
|
28
|
-
|
|
29
|
-
- name: Check Tag Matches pyproject.toml Version
|
|
30
|
-
run: |
|
|
31
|
-
VERSION_IN_FILE=$(python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")
|
|
32
|
-
TAG_VERSION=${GITHUB_REF#refs/tags/v}
|
|
33
|
-
echo "Version in pyproject.toml: $VERSION_IN_FILE"
|
|
34
|
-
echo "Git Tag Version: $TAG_VERSION"
|
|
35
|
-
if [ "$VERSION_IN_FILE" != "$TAG_VERSION" ]; then
|
|
36
|
-
echo "Version mismatch between createdxtag and pyproject.toml"
|
|
37
|
-
exit 1
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
- name: Build Package
|
|
41
|
-
run: python -m build
|
|
42
|
-
|
|
43
|
-
- name: Create GitHub Release
|
|
44
|
-
uses: softprops/action-gh-release@v1
|
|
45
|
-
with:
|
|
46
|
-
generate_release_notes: true
|
|
47
|
-
env:
|
|
48
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
-
|
|
50
|
-
- name: Publish to PyPI
|
|
51
|
-
env:
|
|
52
|
-
TWINE_USERNAME: __token__
|
|
53
|
-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
54
|
-
run: twine upload dist/*
|
|
55
|
-
|
|
56
|
-
# Backup:
|
|
57
|
-
# - name: Publish to TestPyPI
|
|
58
|
-
# env:
|
|
59
|
-
# TWINE_USERNAME: __token__
|
|
60
|
-
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
61
|
-
# run: |
|
|
62
|
-
# pip install twine
|
|
63
|
-
# twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
|
64
|
-
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
sourceprefix = "gitlab::https://gitlab.com/myrepo/repo_path"
|
|
2
|
-
hide_suite_doc = true
|
|
3
|
-
verbose_mode = true
|
|
4
|
-
|
|
5
|
-
[colors]
|
|
6
|
-
# DEFAULT THEME:
|
|
7
|
-
default = "dark"
|
|
8
|
-
# OR CUSTOM THEME:
|
|
9
|
-
# background = "#000028"
|
|
10
|
-
# inner_color = "#000028"
|
|
11
|
-
# button_active_color = "#193966"
|
|
12
|
-
# button_hover_color = "#193966"
|
|
13
|
-
# border_color = "#CCCCCC"
|
|
14
|
-
# text_color = "#CCCCCC"
|
|
15
|
-
# title_color = "#00ffb9"
|
|
16
|
-
# robot_icon = "#00ffb9"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
[tool.testdoc]
|
|
2
|
-
title = "New title of HTML document"
|
|
3
|
-
name = "New name of root suite element"
|
|
4
|
-
doc = "New doc text of root suite element"
|
|
5
|
-
sourceprefix = "gitlab::https://gitlab.com/myrepo/repo_path"
|
|
6
|
-
include = ["TagA", "TagB"]
|
|
7
|
-
exclude = ["TagC"]
|
|
8
|
-
hide_tags = true
|
|
9
|
-
hide_test_doc = true
|
|
10
|
-
hide_suite_doc = true
|
|
11
|
-
hide_source = true
|
|
12
|
-
hide_keywords = true
|
|
13
|
-
style = "blue"
|
|
14
|
-
verbose_mode = false
|
|
15
|
-
|
|
16
|
-
[tool.testdoc.metadata]
|
|
17
|
-
Author = "Your-Name"
|
|
18
|
-
Version = "1.0.0"
|
|
19
|
-
Source = "AnySourceAsMetaData"
|
|
20
|
-
|
|
21
|
-
[tool.testdoc.colors]
|
|
22
|
-
# Use predefined theme:
|
|
23
|
-
default = "blue"
|
|
24
|
-
# or custom colors:
|
|
25
|
-
background = "#000028"
|
|
26
|
-
inner_color = "#000028"
|
|
27
|
-
button_active_color = "#193966"
|
|
28
|
-
button_hover_color = "#193966"
|
|
29
|
-
border_color = "#CCCCCC"
|
|
30
|
-
text_color = "#CCCCCC"
|
|
31
|
-
title_color = "#00ffb9"
|
|
32
|
-
robot_icon = "#00ffb9"
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from click.testing import CliRunner
|
|
3
|
-
from testdoc.cli import main
|
|
4
|
-
|
|
5
|
-
def test_cli_help():
|
|
6
|
-
runner = CliRunner()
|
|
7
|
-
result = runner.invoke(main, ["--help"])
|
|
8
|
-
assert result.exit_code == 0
|
|
9
|
-
assert "Usage" in result.output
|
|
10
|
-
assert "Welcome" in result.output
|
|
11
|
-
|
|
12
|
-
def test_cli_cmd():
|
|
13
|
-
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
14
|
-
robot = os.path.join(current_dir, "test_cli.robot")
|
|
15
|
-
output = os.path.join(current_dir, "output.html")
|
|
16
|
-
runner = CliRunner()
|
|
17
|
-
result = runner.invoke(main, [robot, output])
|
|
18
|
-
assert result.exit_code == 0
|
|
19
|
-
assert "Generated" in result.output
|
|
20
|
-
assert "output.html" in result.output
|
|
21
|
-
assert os.path.exists(output)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def test_cli_cmd_verbose():
|
|
25
|
-
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
26
|
-
robot = os.path.join(current_dir, "test_cli.robot")
|
|
27
|
-
output = os.path.join(current_dir, "output.html")
|
|
28
|
-
runner = CliRunner()
|
|
29
|
-
result = runner.invoke(main, [robot, output, "-v"])
|
|
30
|
-
assert result.exit_code == 0
|
|
31
|
-
assert "Generated" in result.output
|
|
32
|
-
assert "output.html" in result.output
|
|
33
|
-
assert "Saving" in result.output
|
|
34
|
-
assert os.path.exists(output)
|