Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ testdoc suite_directory output.html
testdoc suite_file output.html
```

![General Usage](./docs/gifs/general_usage.gif)

### Extended Usage
```shell
testdoc [OPTIONS] suite_directory output.html
Expand All @@ -51,6 +53,18 @@ You have two option to use it this way:

For further details about the usage, please read the [official documentation](https://marvkler.github.io/robotframework-testdoc/usage).

#### Use customized Jinja2 Template

![Custom Jinja Template](./docs/gifs/customjinja.gif)

#### Use internal Mkdocs Template

![Internal Mkdocs Template](./docs/gifs/mkdocs_internal_template.gif)

#### Use customized Mkdocs Template

![Custom Mkdocs Template](./docs/gifs/mkdocs_custom_template.gif)

## Examples

Visit the official documentation to find some [Examples](https://marvkler.github.io/robotframework-testdoc/usage/#examples).
Expand Down
Binary file added docs/gifs/customjinja.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gifs/general_usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gifs/mkdocs_custom_template.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/gifs/mkdocs_internal_template.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/mkdocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Use the following command to install the tool:
pip install robotframework-testdoc
```

## :material-test-tube: Simple Usage

```shell
testdoc atest/testdata/acceptance output.html
```

![General Usage](./stylesheets/general_usage.gif)

## :material-test-tube: Examples

Visit the [Examples](gettingstarted.md) page for some demo use cases & insights of what the tool is capable of!
Expand Down
Binary file added docs/mkdocs/docs/stylesheets/customjinja.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/mkdocs/docs/stylesheets/general_usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/mkdocs/docs/usage/jinja2.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ testdoc --custom-jinja-template <path>/my_jinja2_template.html suite_directory o
!!! tip "Example"
Please take a look at the [Internal Jinja2 Template](https://github.com/MarvKler/robotframework-testdoc/blob/main/src/testdoc/html/templates/v2/jinja_template_03.html) to get an idea about using the provided metadata by ``testdoc``!

![Jinja Usage](../stylesheets/customjinja.gif)

## Open Jinja2 Webpages

You can simply open the defined output HTML file in any browser on your local system. Jinja2 generates a static HTML pages without any dependecies.
Expand Down
4 changes: 4 additions & 0 deletions docs/mkdocs/docs/usage/mkdocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ testdoc --mkdocs <path/to/test/directory> <path/to/output/dir>

You can take a look at the internal mkdocs template provided by ``robotframework-testdoc`` - here you can find it: [Internal Mkdocs Template](https://github.com/MarvKler/robotframework-testdoc/tree/main/src/testdoc/html/templates/mkdocs_default)

![Mkdocs Internal Usage](../stylesheets/mkdocs_internal_template.gif)

## External Mkdocs Template

You can also created your own ``mkdocs`` template locally which will be used by ``robotframework-testdoc`` as base template & gets extended with the given test suite directory.
Expand All @@ -34,6 +36,8 @@ testdoc --mkdocs --mkdocs-template-dir <path/to/local/mkdocs/template> <path/to/
You can visit the internal mkdocs template as example & if required, you can use this template as a starting point to create your own customized templete.
The template can be found here: [Internal Mkdocs Template](https://github.com/MarvKler/robotframework-testdoc/blob/main/src/testdoc/html/templates/mkdocs_default/docs/_partials/suite_page.md?plain=1)

![Mkdocs Custom Usage](../stylesheets/mkdocs_custom_template.gif)

### Mandatory Files

You need to create some mandatory files & directories when creating your own ``mkdocs`` templates, because they are required by ``robotframework-testdoc``. Please make sure you have the following directory structure with all of the files created:
Expand Down
11 changes: 11 additions & 0 deletions docs/tapes/cmkdocs.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Set Shell zsh
Sleep 500ms
Type "testdoc --mkdocs ate"
Tab
Type "testd"
Tab
Type "acce"
Tab
Type " ."
Enter
Sleep 5s
25 changes: 25 additions & 0 deletions docs/tapes/cmkdocs_temp.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Set Shell zsh
Sleep 1s
Type "testdoc "
Type "--mkdocs --mkdocs-"
Type "template-dir "
Type "sr"
Tab
Type "test"
Tab
Type "htm"
Tab
Type "tem"
Tab
Type "mk"
Tab
Type " ate"
Tab
Type "testd"
Tab
Type "acce"
Tab
Type " ."
Enter
Sleep 5s

22 changes: 22 additions & 0 deletions docs/tapes/customjinja.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Set Shell zsh
Sleep 1s
Type "testdoc --custom-jinja-template sr"
Tab
Type "test"
Tab
Type "h"
Type "tml"
Tab
Type "te"
Tab
Type "v2"
Tab 2
Type "atest"
Tab
Type "testd"
Tab
Type "acc"
Tab
Type " output.html"
Enter
Sleep 5s
13 changes: 13 additions & 0 deletions docs/tapes/general_usage.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Set Shell zsh
Sleep 1s
Type "testdoc "
Type "ate"
Tab
Type "test"
Tab
Type "acce"
Tab
Type " output.html"
Enter
Sleep 5s

7 changes: 7 additions & 0 deletions docs/tapes/help.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Set Shell zsh
Sleep 1s
Type "testdoc --help"
Enter
Sleep 14s
Sleep 2s

25 changes: 25 additions & 0 deletions docs/tapes/mkdocs_temp_usage.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Set Shell zsh
Sleep 1s
Type "testdoc "
Type "--mkdocs --mkdocs-template-dir "
Type "sr"
Tab
Type "tes"
Tab
Type "htm"
Tab
Type "templ"
Tab
Type "mkd"
Tab
Type " atest"
Tab
Type "testd"
Tab
Type "acce"
Tab
Type " "
Type "."
Enter
Sleep 5s

14 changes: 14 additions & 0 deletions docs/tapes/mkdocs_usage.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Set Shell zsh
Sleep 1s
Type "testdoc "
Type "--mkdocs atest"
Tab
Type "testdata"
Tab
Type "acceptance"
Tab
Type " "
Type "."
Enter
Sleep 5s

5 changes: 4 additions & 1 deletion src/testdoc/html/rendering/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ def _install_main_py(self, work_dir: Path) -> None:
shutil.copyfile(src, dst)

def _mkdocs_build(self, work_dir: Path) -> None:
subprocess.check_call(["mkdocs", "build", "-f", str(work_dir / "mkdocs.yml")])
cmd = ["mkdocs", "build", "-f", str(work_dir / "mkdocs.yml")]
if not self.args.verbose_mode:
cmd.append("--quiet")
subprocess.check_call(cmd)
Logger().Log("---------------------------------------------------------------------------", "green")
Logger().Log("Generated mkdocs pages here:", "green")
Logger().Log(work_dir)
Expand Down