📝 Text-Based Email Report
- Universal Compatibility: Plain text format works in all email providers
- Detailed Information: Comprehensive test results and statistics
- Professional Format: Clean, structured layout for stakeholders
- Easy to Copy: One-click copying to clipboard
📄 Email Content Preview
{{ session.suite_name or 'Test Suite' }} - Test Report
{{ '=' * 60 }}
📧 SUBJECT: {{ session.suite_name or 'Test Suite' }} Report : {{ session.end_time.strftime('%Y:%m:%d') }}: Total : {{ summary.total }} ; Pass : {{ summary.passed }}: Fail : {{ summary.failed }} ; PassWExcep: {% set overridden_pass = scenarios|selectattr('is_overridden', 'equalto', true)|selectattr('status', 'equalto', 'passed')|list|length %}{{ overridden_pass }}
📊 EXECUTIVE SUMMARY
{{ '-' * 30 }}
Suite Name : {{ session.suite_name or 'Test Suite' }}
Test Date : {{ session.end_time.strftime('%Y-%m-%d') }}
Test Time : {{ session.end_time.strftime('%H:%M:%S') }}
Total Tests : {{ summary.total }}
Passed Tests : {{ summary.passed }}
Failed Tests : {{ summary.failed }}{% if summary.skipped > 0 %}
Skipped Tests : {{ summary.skipped }}{% endif %}
Pass Rate : {{ "%.1f"|format(summary.pass_rate) }}%
Total Duration : {{ "%.2f"|format(session.duration) }} seconds
{% if summary.failed == 0 %}
✅ STATUS : ALL TESTS PASSED{% else %}
⚠️ STATUS : {{ summary.failed }} TEST(S) FAILED{% endif %}
{% if summary.failed > 0 %}❌ FAILED TESTS DETAILS
{{ '-' * 30 }}
{% for scenario in scenarios %}{% if scenario.status == 'failed' %}
Test Name: {{ scenario.name }}
{% if scenario.feature %}Suite: {{ scenario.feature }}{% endif %}
Duration: {{ "%.3f"|format(scenario.duration) }}s
{% if scenario.error %}Error: {{ scenario.error.split('\n')[0][:150] }}{% if scenario.error.split('\n')[0]|length > 150 %}...{% endif %}{% endif %}
{{ '-' * 50 }}
{% endif %}{% endfor %}
{% endif %}📋 COMPLETE TEST RESULTS
{{ '-' * 30 }}
| # | Test Name | Status | Duration | Suite | Tags |
|---|------------------------------|---------|----------|-----------------|-------------|
{% for scenario in scenarios %}| {{ "%2d"|format(loop.index) }} | {{ "%-28s"|format(scenario.name[:28]) }} | {{ "%-7s"|format(scenario.status|upper) }} | {{ "%8.3f"|format(scenario.duration) }}s | {{ "%-15s"|format((scenario.feature or 'Unknown')[:15]) }} | {{ "%-11s"|format((scenario.tags|join(',') if scenario.tags else 'None')[:11]) }} |
{% endfor %}{{ '-' * 85 }}
{% if features %}📦 SUITE BREAKDOWN
{{ '-' * 30 }}
{% for feature in features %}Suite: {{ feature.name }}
Total Tests : {{ feature.passed + feature.failed + feature.skipped }}
Passed : {{ feature.passed }}
Failed : {{ feature.failed }}{% if feature.skipped > 0 %}
Skipped : {{ feature.skipped }}{% endif %}
Pass Rate : {% set total = feature.passed + feature.failed + feature.skipped %}{% if total > 0 %}{{ "%.1f"|format((feature.passed / total) * 100) }}%{% else %}0.0%{% endif %}
{{ '-' * 40 }}
{% endfor %}
{% endif %}📈 KEY METRICS
{{ '-' * 30 }}
• Average Test Duration: {{ "%.3f"|format(session.duration / summary.total if summary.total > 0 else 0) }}s
• Fastest Test: {% set fastest = scenarios|selectattr('status', 'ne', 'skipped')|min(attribute='duration') %}{{ fastest.name }} ({{ "%.3f"|format(fastest.duration) }}s)
• Slowest Test: {% set slowest = scenarios|selectattr('status', 'ne', 'skipped')|max(attribute='duration') %}{{ slowest.name }} ({{ "%.3f"|format(slowest.duration) }}s)
• Success Rate: {{ "%.1f"|format(summary.pass_rate) }}%
{% if summary.failed > 0 %}• Failure Rate: {{ "%.1f"|format((summary.failed / summary.total) * 100) }}%{% endif %}
{% if summary.failed > 0 %}⚠️ ACTION REQUIRED
{{ '-' * 30 }}
This report contains {{ summary.failed }} failed test(s) that require attention.
Please review the failed tests section above and take appropriate action.
{% endif %}{{ '=' * 85 }}
Generated by pytest-bdd-reporter on {{ session.end_time.strftime('%Y-%m-%d %H:%M:%S') }}
{{ '=' * 85 }}