robotframework-testdoc 0.6.2__tar.gz → 0.6.3a2__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.3a2
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
@@ -47,6 +47,17 @@ Visit the project at [GitHub - robotframework-testdoc](https://github.com/MarvKl
47
47
 
48
48
  Visit the official documentation for more details: [Documentation - robotframework-testdoc](https://marvkler.github.io/robotframework-testdoc/)
49
49
 
50
+ ## VS Code Extension
51
+
52
+ Generate test documentation directly from the VS Code Explorer — no terminal required.
53
+ Download the latest `.vsix` from [GitHub Releases](https://github.com/MarvKler/robotframework-testdoc/releases) and install it locally.
54
+
55
+ ```bash
56
+ code --install-extension testdoc-vscode-<version>.vsix
57
+ ```
58
+
59
+ See the [VS Code Extension documentation](https://marvkler.github.io/robotframework-testdoc/usage/vscode-extension/) for details.
60
+
50
61
  ## Statistics
51
62
 
52
63
  [![Release Pipeline](https://github.com/MarvKler/robotframework-testdoc/actions/workflows/release.yml/badge.svg)](https://github.com/MarvKler/robotframework-testdoc/actions/workflows/release.yml)
@@ -81,6 +92,20 @@ testdoc [OPTIONS] suite_directory output.html
81
92
  > [!TIP]
82
93
  > **Included Help:** Visit the [CLI Documentation](https://marvkler.github.io/robotframework-testdoc/cli/cli/) for further arguments & details.
83
94
 
95
+ ### Output Formats
96
+
97
+ By default testdoc generates an HTML file. Use `-f` / `--output-format` to choose a different format:
98
+
99
+ ```shell
100
+ # HTML (default)
101
+ testdoc tests/ TestDocumentation.html
102
+
103
+ # JSON — machine-readable suite tree
104
+ testdoc -f json tests/ TestDocumentation.json
105
+ ```
106
+
107
+ Available values: `html` (default), `json`.
108
+
84
109
  ### Plugin Usage
85
110
 
86
111
  You can use the testdoc tool also as plugin integration.
@@ -10,6 +10,17 @@ Visit the project at [GitHub - robotframework-testdoc](https://github.com/MarvKl
10
10
 
11
11
  Visit the official documentation for more details: [Documentation - robotframework-testdoc](https://marvkler.github.io/robotframework-testdoc/)
12
12
 
13
+ ## VS Code Extension
14
+
15
+ Generate test documentation directly from the VS Code Explorer — no terminal required.
16
+ Download the latest `.vsix` from [GitHub Releases](https://github.com/MarvKler/robotframework-testdoc/releases) and install it locally.
17
+
18
+ ```bash
19
+ code --install-extension testdoc-vscode-<version>.vsix
20
+ ```
21
+
22
+ See the [VS Code Extension documentation](https://marvkler.github.io/robotframework-testdoc/usage/vscode-extension/) for details.
23
+
13
24
  ## Statistics
14
25
 
15
26
  [![Release Pipeline](https://github.com/MarvKler/robotframework-testdoc/actions/workflows/release.yml/badge.svg)](https://github.com/MarvKler/robotframework-testdoc/actions/workflows/release.yml)
@@ -44,6 +55,20 @@ testdoc [OPTIONS] suite_directory output.html
44
55
  > [!TIP]
45
56
  > **Included Help:** Visit the [CLI Documentation](https://marvkler.github.io/robotframework-testdoc/cli/cli/) for further arguments & details.
46
57
 
58
+ ### Output Formats
59
+
60
+ By default testdoc generates an HTML file. Use `-f` / `--output-format` to choose a different format:
61
+
62
+ ```shell
63
+ # HTML (default)
64
+ testdoc tests/ TestDocumentation.html
65
+
66
+ # JSON — machine-readable suite tree
67
+ testdoc -f json tests/ TestDocumentation.json
68
+ ```
69
+
70
+ Available values: `html` (default), `json`.
71
+
47
72
  ### Plugin Usage
48
73
 
49
74
  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
 
@@ -0,0 +1,68 @@
1
+ # testdoc – VS Code Extension
2
+
3
+ Generate Robot Framework test documentation directly from the VS Code Explorer — no terminal required.
4
+
5
+ ## Requirements
6
+
7
+ - **VS Code** `^1.85.0`
8
+ - **Python extension** (`ms-python.python`) installed and configured
9
+ - **robotframework-testdoc** installed in your active Python environment:
10
+ ```bash
11
+ pip install robotframework-testdoc
12
+ ```
13
+
14
+ ## Installation
15
+
16
+ This extension is not published on the VS Code Marketplace.
17
+ Download the latest `.vsix` file from the [GitHub Releases](https://github.com/MarvKler/robotframework-testdoc/releases) page and install it locally.
18
+
19
+ **Option A – VS Code UI:**
20
+ 1. Open the Extensions view (`Ctrl+Shift+X` / `Cmd+Shift+X`)
21
+ 2. Click the `...` menu → **Install from VSIX...**
22
+ 3. Select the downloaded `.vsix` file
23
+
24
+ **Option B – Terminal:**
25
+ ```bash
26
+ code --install-extension testdoc-vscode-<version>.vsix
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ Right-click any folder in the Explorer and choose one of the three commands:
32
+
33
+ | Command | Description |
34
+ |---|---|
35
+ | **testdoc: Generate HTML Documentation** | Generates a self-contained `.html` test documentation file |
36
+ | **testdoc: Generate JSON Documentation** | Generates a machine-readable `.json` suite tree |
37
+ | **testdoc: Generate MkDocs Output** | Generates a full MkDocs project into a selected output directory |
38
+
39
+ ### HTML / JSON
40
+
41
+ 1. Right-click a folder containing your `.robot` files
42
+ 2. Select **testdoc: Generate HTML Documentation** or **testdoc: Generate JSON Documentation**
43
+ 3. A save dialog opens — choose the output file location and name
44
+ 4. A terminal runs `testdoc` and the file is written to the chosen location
45
+
46
+ ### MkDocs
47
+
48
+ 1. Right-click a folder containing your `.robot` files
49
+ 2. Select **testdoc: Generate MkDocs Output**
50
+ 3. A folder picker opens — select an **empty or new** output directory
51
+ 4. A terminal runs `testdoc --mkdocs` and the MkDocs project is written to the selected directory
52
+
53
+ > The extension automatically uses the Python interpreter configured for the workspace via the **Python extension**.
54
+ > Make sure `robotframework-testdoc` is installed in that interpreter.
55
+
56
+ ## Troubleshooting
57
+
58
+ **`python: command not found` / `testdoc: No module named testdoc`**
59
+ → Select the correct Python interpreter via `Ctrl+Shift+P` → **Python: Select Interpreter** and ensure `robotframework-testdoc` is installed there.
60
+
61
+ **The context menu commands do not appear**
62
+ → Right-click must be on a **folder**, not a file.
63
+
64
+ ## Related Links
65
+
66
+ - [robotframework-testdoc on PyPI](https://pypi.org/project/robotframework-testdoc)
67
+ - [Official Documentation](https://marvkler.github.io/robotframework-testdoc/)
68
+ - [GitHub Repository](https://github.com/MarvKler/robotframework-testdoc)