{% set suite = suites[0] if suites else None %}
{% macro render_suite_block(s, level) %}
{{ s.name }}
{% if s.is_folder %}{{ s.total_tests }}{% else %}{{ s.num_tests }}{% endif %} Tests in this suite {% if s.is_folder %} Suite Directory {% else %} Suite File {% endif %}
Suite Details
General information about the selected test suite
Name
{{ s.name }}
Source
{% if s.source %} {{ s.source }} {% else %} {{ s.source }} {% endif %}
Tests (direct)
{{ s.num_tests }}
Tests (total)
{{ s.total_tests }}
{% if s.doc %}
Suite Documentation
Description and notes
{% for line in s.doc %}

{{ line }}

{% endfor %}
{% endif %} {% if s.metadata %}
Metadata
Additional suite information
Metadata
{% endif %} {% if s.user_keywords %}
User Keywords
Defined user keywords in this suite
*** Keywords ***
{{ s.user_keywords | join('\n') }}
{% endif %} {% if s.tests %}
Test Case OVERVIEW
Overview about test cases in this suite
*** Test Cases ***
{{ s.tests | map(attribute='name') | join('\n') }}
Test Case Details
Details for each test case in this suite
{% for test in s.tests %}
{{ test.name }}
Documentation
{% if test.doc %}
{% if test.doc is string %}{{ test.doc }}{% else %}{{ test.doc | join('\n') }}{% endif %}
{% else %} No description. {% endif %}
Tags
{% if test.tags %}
{% for tag in test.tags %} {% if tag is mapping %} {{ tag.name or tag }} {% else %} {{ tag }} {% endif %} {% endfor %}
{% else %} No tags. {% endif %}
Test Case Body
{% if test.keywords %}
*** Test Cases ***
{{ test.name }}
    {{ test.keywords | join('\n    ') }}
{% else %} No keywords. {% endif %}
{% endfor %}
{% endif %} {% if s.sub_suites %}
Sub-suites
Structure of nested suites
{% macro render_suite_details(s2, level2) %}
{{ s2.name }} ({{ s2.num_tests }} / {{ s2.total_tests }} tests)
{{ s2.filename }}
{% if s2.doc %}
{% for line in s2.doc[:2] %}

{{ line }}

{% endfor %} {% if s2.doc|length > 2 %}

… ({{ s2.doc|length - 2 }} more lines)

{% endif %}
{% endif %}
{% for child in s2.sub_suites %} {{ render_suite_details(child, level2 + 1) }} {% endfor %} {% endmacro %} {{ render_suite_details(s, 0) }}
{% endif %}
{% for child in s.sub_suites %} {{ render_suite_block(child, level + 1) }} {% endfor %} {% endmacro %}
{% if suites %} {% for root in suites %} {{ render_suite_block(root, 0) }} {% endfor %} {% else %}

No suites available.

{% endif %}