email_template.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>自动化测试报告</title>
  6. <style>
  7. body { font-family: Arial, sans-serif; line-height: 1.6; color: #333; }
  8. .container { max-width: 800px; margin: 0 auto; padding: 20px; }
  9. .header { background-color: #f8f9fa; padding: 20px; border-radius: 5px; margin-bottom: 20px; }
  10. .summary { background-color: #e9ecef; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
  11. .stats { display: flex; justify-content: space-between; margin-bottom: 20px; }
  12. .stat-box { flex: 1; text-align: center; padding: 15px; border-radius: 5px; margin: 0 5px; }
  13. .passed { background-color: #d4edda; color: #155724; }
  14. .failed { background-color: #f8d7da; color: #721c24; }
  15. .skipped { background-color: #fff3cd; color: #856404; }
  16. .total { background-color: #d1ecf1; color: #0c5460; }
  17. .footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid #dee2e6; color: #6c757d; }
  18. </style>
  19. </head>
  20. <body>
  21. <div class="container">
  22. <div class="header">
  23. <h1>自动化测试报告</h1>
  24. <p>{{ company_name }} - {{ team_name }}</p>
  25. </div>
  26. <div class="summary">
  27. <h2>测试执行摘要</h2>
  28. <p>测试运行已完成,以下是执行结果的摘要信息。</p>
  29. </div>
  30. <div class="stats">
  31. <div class="stat-box total">
  32. <h3>总测试数</h3>
  33. <p>{{ test_results.total }}</p>
  34. </div>
  35. <div class="stat-box passed">
  36. <h3>通过</h3>
  37. <p>{{ test_results.passed }}</p>
  38. </div>
  39. <div class="stat-box failed">
  40. <h3>失败</h3>
  41. <p>{{ test_results.failed }}</p>
  42. </div>
  43. <div class="stat-box skipped">
  44. <h3>跳过</h3>
  45. <p>{{ test_results.skipped }}</p>
  46. </div>
  47. </div>
  48. <div>
  49. <h2>详细结果</h2>
  50. <p><strong>通过率:</strong> {{ test_results.pass_rate }}%</p>
  51. <p><strong>执行时长:</strong> {{ test_results.duration }} 秒</p>
  52. <p><strong>报告生成时间:</strong> {{ report_info.timestamp }}</p>
  53. </div>
  54. <div class="footer">
  55. <p>此邮件由自动化测试系统自动生成,请勿直接回复。</p>
  56. <p>如有问题,请联系相关测试团队成员。</p>
  57. </div>
  58. </div>
  59. </body>
  60. </html>