robotframework-testdoc 0.3.0__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.3.0 → robotframework_testdoc-0.3.1}/.gitignore +5 -1
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/PKG-INFO +27 -5
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/README.md +24 -2
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/pyproject.toml +3 -3
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v2/jinja_template_03.html +69 -24
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/LICENSE +0 -0
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/src/testdoc/default.toml +0 -0
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/src/testdoc/html/images/robotframework.svg +0 -0
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v1/jinja_template_01.html +0 -0
- {robotframework_testdoc-0.3.0 → robotframework_testdoc-0.3.1}/src/testdoc/html/templates/v1/jinja_template_02.html +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-testdoc
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts.
|
|
5
5
|
Project-URL: Repository, https://github.com/MarvKler/robotframework-testdoc
|
|
6
6
|
Project-URL: Issues, https://github.com/MarvKler/robotframework-testdoc/issues
|
|
@@ -9,13 +9,13 @@ License: Apache-2.0
|
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Requires-Python: >=3.
|
|
15
|
+
Requires-Python: >=3.10
|
|
17
16
|
Requires-Dist: click
|
|
18
17
|
Requires-Dist: jinja2
|
|
18
|
+
Requires-Dist: pydantic
|
|
19
19
|
Requires-Dist: robotframework
|
|
20
20
|
Requires-Dist: tomli
|
|
21
21
|
Provides-Extra: dev
|
|
@@ -110,6 +110,20 @@ testdoc --hide-source tests/ TestDocumentation.html
|
|
|
110
110
|
testdoc --hide-keywords tests/ TestDocumentation.html
|
|
111
111
|
```
|
|
112
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
|
+
|
|
113
127
|
## Robot Framework Tags
|
|
114
128
|
The commandline arguments ``include`` & ``exclude`` have more or less the same functionality like in the known ``robot ...`` command.
|
|
115
129
|
You can decide to weither include and / or exclude specific test cases into the test documentation.
|
|
@@ -167,6 +181,8 @@ border_color = "#CCCCCC"
|
|
|
167
181
|
text_color = "#CCCCCC"
|
|
168
182
|
title_color = "#00ffb9"
|
|
169
183
|
robot_icon = "#00ffb9"
|
|
184
|
+
code_area_background = "#303030"
|
|
185
|
+
code_area_foreground = "#f1f1f1"
|
|
170
186
|
```
|
|
171
187
|
|
|
172
188
|
## HTML Template Selection
|
|
@@ -178,7 +194,7 @@ These template can be configured via ``cli arguments`` or within a ``.toml confi
|
|
|
178
194
|
|
|
179
195
|
- v2
|
|
180
196
|
|
|
181
|
-
### Available HTML Templates
|
|
197
|
+
### Available HTML Templates - NOT RECOMMENDED
|
|
182
198
|
|
|
183
199
|
You can choose one of the following designs:
|
|
184
200
|
- v1
|
|
@@ -259,6 +275,8 @@ border_color = "#CCCCCC"
|
|
|
259
275
|
text_color = "#CCCCCC"
|
|
260
276
|
title_color = "#00ffb9"
|
|
261
277
|
robot_icon = "#00ffb9"
|
|
278
|
+
code_area_background = "#303030"
|
|
279
|
+
code_area_foreground = "#f1f1f1"
|
|
262
280
|
```
|
|
263
281
|
|
|
264
282
|
> [!TIP]
|
|
@@ -276,4 +294,8 @@ robot_icon = "#00ffb9"
|
|
|
276
294
|
|
|
277
295
|
#### Robot / Default
|
|
278
296
|
|
|
279
|
-

|
|
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.
|
|
@@ -7,7 +7,7 @@ name = "robotframework-testdoc"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = "A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts."
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "Marvin Klerx", email = "marvinklerx20@gmail.com" }
|
|
13
13
|
]
|
|
@@ -16,7 +16,6 @@ license = { text = "Apache-2.0" }
|
|
|
16
16
|
classifiers = [
|
|
17
17
|
"Development Status :: 4 - Beta",
|
|
18
18
|
"Programming Language :: Python",
|
|
19
|
-
"Programming Language :: Python :: 3.9",
|
|
20
19
|
"Programming Language :: Python :: 3.10",
|
|
21
20
|
"Programming Language :: Python :: 3.11",
|
|
22
21
|
"Programming Language :: Python :: 3.12"
|
|
@@ -26,7 +25,8 @@ dependencies = [
|
|
|
26
25
|
"click",
|
|
27
26
|
"robotframework",
|
|
28
27
|
"jinja2",
|
|
29
|
-
"tomli"
|
|
28
|
+
"tomli",
|
|
29
|
+
"pydantic"
|
|
30
30
|
]
|
|
31
31
|
|
|
32
32
|
[project.optional-dependencies]
|
|
@@ -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 %}
|
|
@@ -210,6 +240,21 @@
|
|
|
210
240
|
.sidebar { min-width: 120px; max-width: 180px; }
|
|
211
241
|
.main-content { padding: 10px; }
|
|
212
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
|
+
}
|
|
213
258
|
</style>
|
|
214
259
|
</head>
|
|
215
260
|
<body>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|