robotframework-testdoc 0.6.2__tar.gz → 0.6.3a1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robotframework-testdoc
3
- Version: 0.6.2
3
+ Version: 0.6.3a1
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
@@ -81,6 +81,20 @@ testdoc [OPTIONS] suite_directory output.html
81
81
  > [!TIP]
82
82
  > **Included Help:** Visit the [CLI Documentation](https://marvkler.github.io/robotframework-testdoc/cli/cli/) for further arguments & details.
83
83
 
84
+ ### Output Formats
85
+
86
+ By default testdoc generates an HTML file. Use `-f` / `--output-format` to choose a different format:
87
+
88
+ ```shell
89
+ # HTML (default)
90
+ testdoc tests/ TestDocumentation.html
91
+
92
+ # JSON — machine-readable suite tree
93
+ testdoc -f json tests/ TestDocumentation.json
94
+ ```
95
+
96
+ Available values: `html` (default), `json`.
97
+
84
98
  ### Plugin Usage
85
99
 
86
100
  You can use the testdoc tool also as plugin integration.
@@ -44,6 +44,20 @@ testdoc [OPTIONS] suite_directory output.html
44
44
  > [!TIP]
45
45
  > **Included Help:** Visit the [CLI Documentation](https://marvkler.github.io/robotframework-testdoc/cli/cli/) for further arguments & details.
46
46
 
47
+ ### Output Formats
48
+
49
+ By default testdoc generates an HTML file. Use `-f` / `--output-format` to choose a different format:
50
+
51
+ ```shell
52
+ # HTML (default)
53
+ testdoc tests/ TestDocumentation.html
54
+
55
+ # JSON — machine-readable suite tree
56
+ testdoc -f json tests/ TestDocumentation.json
57
+ ```
58
+
59
+ Available values: `html` (default), `json`.
60
+
47
61
  ### Plugin Usage
48
62
 
49
63
  You can use the testdoc tool also as plugin integration.
@@ -53,6 +53,16 @@
53
53
  <span class="topbar-stat-label">Tests</span>
54
54
  </div>
55
55
  {% endif %}
56
+ {% if suite %}
57
+ <button class="dashboard-toggle" id="dashboardToggle" aria-label="Statistics Dashboard" title="Statistics Dashboard">
58
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
59
+ <rect x="2" y="12" width="4" height="9" rx="1"/>
60
+ <rect x="9" y="7" width="4" height="14" rx="1"/>
61
+ <rect x="16" y="3" width="4" height="18" rx="1"/>
62
+ </svg>
63
+ <span>Statistics</span>
64
+ </button>
65
+ {% endif %}
56
66
  <button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">
57
67
  <svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
58
68
  <circle cx="12" cy="12" r="5"/>
@@ -129,6 +139,15 @@
129
139
  {% endif %}
130
140
  </ul>
131
141
  </div>
142
+ <!-- TAG FILTER PANEL -->
143
+ <div class="tag-filter-panel" id="tagFilterPanel">
144
+ <div class="tag-filter-header">
145
+ <span class="tag-filter-title">Filter by Tag</span>
146
+ <button class="tag-filter-clear-btn" id="tagFilterClear">Clear all</button>
147
+ </div>
148
+ <div class="tag-filter-tags" id="tagFilterList"></div>
149
+ <div class="tag-filter-status" id="tagFilterStatus"></div>
150
+ </div>
132
151
  </aside>
133
152
 
134
153
  <!-- MAIN CONTENT -->
@@ -153,7 +172,7 @@
153
172
  {% endmacro %}
154
173
 
155
174
  {% macro render_suite_block(s, level) %}
156
- <section class="suite-block" data-suite-id="{{ s.id }}">
175
+ <section class="suite-block" data-suite-id="{{ s.id }}" data-suite-name="{{ s.name }}" data-suite-depth="{{ level }}" data-test-count="{{ s.test_count }}">
157
176
 
158
177
  <!-- Per-suite sticky header -->
159
178
  <header class="content-header" id="suite-{{ s.id }}">
@@ -216,6 +235,43 @@
216
235
  </section>
217
236
  {% endif %}
218
237
 
238
+ <!-- Suite Setup / Teardown -->
239
+ {% if s.setup or s.teardown %}
240
+ <section class="section suite-fixture-block" data-suite-id="{{ s.id }}">
241
+ <div class="section-header">
242
+ <span class="section-title">Suite Setup &amp; Teardown</span>
243
+ <span class="section-subtitle">Lifecycle keywords for this suite</span>
244
+ </div>
245
+ <script type="application/x-ndjson" class="kw-doc-ndjson" data-test-target="suite-fixture-{{ s.id }}">
246
+ {% if s.setup and s.setup.keyword_doc %}
247
+ {{ {'name': s.setup.name, 'owner': s.setup.keyword_owner, 'doc': s.setup.keyword_doc, 'args': s.setup.args, 'fixture': 'setup'} | dump_json }}
248
+ {% endif %}
249
+ {% if s.teardown and s.teardown.keyword_doc %}
250
+ {{ {'name': s.teardown.name, 'owner': s.teardown.keyword_owner, 'doc': s.teardown.keyword_doc, 'args': s.teardown.args, 'fixture': 'teardown'} | dump_json }}
251
+ {% endif %}
252
+ </script>
253
+ <div class="code-wrapper">
254
+ <button class="code-toggle">
255
+ <span>Show / Hide Code</span>
256
+ <span class="code-toggle-icon" aria-hidden="true">
257
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>
258
+ </span>
259
+ </button>
260
+ <div class="code-toggle-body">
261
+ {% set setup_line = [s.setup] | format_test_body | join('') if s.setup else '' %}
262
+ {% set teardown_line = [s.teardown] | format_test_body | join('') if s.teardown else '' %}
263
+ {% set code -%}
264
+ *** Settings ***
265
+ {% if s.setup %}Suite Setup {{ setup_line }}
266
+ {% endif %}{% if s.teardown %}Suite Teardown {{ teardown_line }}
267
+ {% endif %}
268
+ {%- endset %}
269
+ {{ code | highlight_robot_in_pre | safe }}
270
+ </div>
271
+ </div>
272
+ </section>
273
+ {% endif %}
274
+
219
275
  <!-- Metadata -->
220
276
  {% if s.metadata %}
221
277
  <section class="section">
@@ -285,7 +341,9 @@
285
341
  </div>
286
342
  <div class="tests-list">
287
343
  {% for test in s.tests %}
288
- <section id="test-{{ s.id }}-{{ loop.index0 }}" class="test-block collapsed">
344
+ {%- set _test_tags = [] -%}
345
+ {%- for _t in (test.tags or []) -%}{%- if _test_tags.append((_t.name if _t is mapping else _t) | string) -%}{%- endif -%}{%- endfor -%}
346
+ <section id="test-{{ s.id }}-{{ loop.index0 }}" class="test-block collapsed" data-tags="{{ _test_tags | dump_json | e }}" data-has-doc="{{ '1' if test.doc else '0' }}">
289
347
  <div class="test-header">
290
348
  <div class="test-name">{{ test.name }}</div>
291
349
  <span class="test-collapse-icon" aria-hidden="true">
@@ -412,6 +470,10 @@
412
470
  {% endfor %}
413
471
  {% endmacro %}
414
472
 
473
+ <!-- Statistics Dashboard (hidden by default, built by JS) -->
474
+ <div id="dashboardPanel" class="dashboard-panel" style="display:none" role="region" aria-label="Statistics Dashboard"></div>
475
+
476
+ <div id="suiteContent">
415
477
  {% if suites %}
416
478
  {{ render_suite_block(suites, 0) }}
417
479
  {% else %}
@@ -428,6 +490,7 @@
428
490
  <span class="content-footer-sep">·</span>
429
491
  <a href="https://github.com/MarvKler/robotframework-testdoc" target="_blank" rel="noopener noreferrer">Contribute on GitHub</a>
430
492
  </footer>
493
+ </div>{# /suiteContent #}
431
494
  </main>
432
495
  </div>
433
496