Python Library Unittest
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {%- import 'macros.tex' as macros %}
  2. {%- include 'unittest_head.tex' %}
  3. {%- include 'unittest_titlepage.tex' %}
  4. \tableofcontents
  5. \newpage
  6. \section{Test Information}
  7. \subsection{Test Candidate Information}
  8. {%- with testobject_information = data.testobject_information %}
  9. {%- include 'information/candidate.tex' %}
  10. {%- endwith %}
  11. \subsection{Unittest Information}
  12. {%- with unittest_information = data.unittest_information %}
  13. {%- include 'information/unittest.tex' %}
  14. {%- endwith %}
  15. \subsection{Test System Information}
  16. {%- with system_information = data.system_information %}
  17. {%- include 'information/system.tex' %}
  18. {%- endwith %}
  19. \section{Statistic}
  20. {%- for testrun in data.testrun_list %}
  21. \subsection{\textcolor{% if testrun.number_of_failed_tests > 0%}{red}{% else %}{% if testrun.number_of_possibly_failed_tests > 0%}{orange}{% else %}{green}{% endif %}{% endif %}{Test-Statistic for testrun with {{testrun.interpreter}}}}
  22. {%- include 'test/run_statistic.tex' %}
  23. {%- endfor %}
  24. \subsection{Coverage Statistic}
  25. {%- with coverage_information = data.coverage_information %}
  26. {%- include 'coverage/statistic.tex' %}
  27. {%- endwith %}
  28. \newpage
  29. {%- if data.specification.get('item_dict', {})|length >0 %}
  30. \section{Tested Requirements}
  31. {%- for item_id in data.specification.uid_list_sorted %}
  32. {%- if item_id not in data.lost_souls.item_list %}
  33. {%- with item = data.specification.item_dict[item_id] %}
  34. {%- if item.system_type_uid == '_4-K5EHYYEem_kd-7nxt1sg' %}
  35. {%- with sectype = 'subsection' %}
  36. {%- include 'reqif/heading.tex' %}
  37. {%- endwith %}
  38. {%- elif item.system_type_uid == '_MR7eNHYYEem_kd-7nxt1sg' %}
  39. {%- with sectype = 'subsubsection', labeltype = 'item:' %}
  40. {%- include 'reqif/requirement.tex' %}
  41. {%- endwith %}
  42. {%- if item_id not in data.lost_souls.item_list %}
  43. {%- for testrun in data.testrun_list %}
  44. {%- if item.system_uid in testrun.testcases %}
  45. {%- with testcase = testrun.testcases[item.system_uid] %}
  46. {%- include 'test/case_short.tex' %}
  47. {%- endwith %}
  48. {%- else %}
  49. \textcolor{orange}{\bf No testresults available!}
  50. {%- endif %}
  51. {%- endfor %}
  52. {%- endif %}
  53. {%- endif %}
  54. {%- endwith %}
  55. {%- endif %}
  56. {%- endfor %}
  57. {%- endif %}
  58. {% if data.lost_souls.item_list|length > 0 %}
  59. \newpage
  60. \section{\textcolor{red}{Requirements with no corresponding Testcase}}
  61. {% for item_id in data.specification.uid_list_sorted %}
  62. {% with item = data.specification.item_dict[item_id] %}
  63. {% if item.system_type_uid == '_MR7eNHYYEem_kd-7nxt1sg' and item_id in data.lost_souls.item_list %}
  64. {%- with sectype = 'subsection', labeltype = 'lost_soul:' %}
  65. {% include 'reqif/requirement.tex' %}
  66. {%- endwith %}
  67. {% endif %}
  68. {% endwith %}
  69. {% endfor %}
  70. {% endif %}
  71. {% if data.lost_souls.testcase_list|length > 0 %}
  72. \newpage
  73. \section{\textcolor{orange}{Testcases with no corresponding Requirement}}
  74. {%- for testrun in data.testrun_list %}
  75. \subsection{Summary for testrun with {{ testrun.interpreter }}}
  76. {% for lost_soul_id in data.lost_souls.testcase_list %}
  77. {% if lost_soul_id in testrun.testcases %}
  78. {% with testcase = testrun.testcases[lost_soul_id] %}
  79. \subsubsection{ {{macros.latex_filter(testcase.message)}} }
  80. {% include 'test/case_short.tex' %}
  81. {% endwith %}
  82. {% endif %}
  83. {% endfor %}
  84. {% endfor %}
  85. {% endif %}
  86. \newpage
  87. \appendix
  88. {%- for testrun in data.testrun_list %}
  89. \section{Trace for testrun with {{ testrun.interpreter }}}
  90. {%- for max_level, absmax_level, num_tests in ( (40, 1000, testrun.number_of_failed_tests), (30, 39, testrun.number_of_possibly_failed_tests), (0, 29, testrun.number_of_successfull_tests) ) %}
  91. {% if num_tests > 0 %}
  92. \subsection{Tests with status {{ macros.result(max_level) }} ({{num_tests}})}
  93. {%- for testcase_id in testrun.uid_list_sorted %}
  94. {% with testcase = testrun.testcases[testcase_id], item = data.specification.get('item_dict', {}).get(testrun.testcases[testcase_id].message) %}
  95. {%- if testcase.levelno >= max_level and testcase.levelno <= absmax_level%}
  96. {%- if item %}
  97. {%- with sectype = 'subsubsection', labeltype = 'testcase:' + testrun.testrun_id + '__' %}
  98. {%- include 'reqif/requirement.tex' %}
  99. {%- endwith %}
  100. {%- else %}
  101. \subsubsection{ {{ macros.latex_filter(testcase.message) }} }\label{testcase:{{testrun.testrun_id}}__{{testcase.message}}}
  102. {%- endif %}
  103. {% include "test/case_long.tex" %}
  104. {%- endif %}
  105. {%- endwith %}
  106. {%- endfor %}
  107. {%- endif %}
  108. {% endfor %}
  109. {%- endfor %}
  110. {% with coverage_information = data.coverage_information %}
  111. {% include 'coverage/report.tex' %}
  112. {% endwith %}
  113. {% include 'unittest_foot.tex' %}