Skip to content

Commit

Permalink
feat(anta): Add test categories and description to nrfu report (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
titom73 authored Jul 5, 2023
1 parent c70e2cb commit b8455b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions anta/reporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,16 @@ def report_all(
Table: A fully populated rich Table
"""
table = Table(title=title)
headers = ["Device IP", "Test Name", "Test Status", "Message(s)"]
headers = ["Device IP", "Test Name", "Test Status", "Message(s)", "Test description", "Test category"]
table = self._build_headers(headers=headers, table=table)

for result in result_manager.get_results(output_format="list"):
# pylint: disable=R0916
if (host is None and testcase is None) or (host is not None and str(result.name) == host) or (testcase is not None and testcase == str(result.test)):
state = self._color_result(status=str(result.result), output_type="str")
message = self._split_list_to_txt_list(result.messages) if len(result.messages) > 0 else ""
table.add_row(str(result.name), result.test, state, message)
test_categories = ", ".join(result.test_category)
table.add_row(str(result.name), result.test, state, message, result.test_description, test_categories)
return table

def report_summary_tests(
Expand Down

0 comments on commit b8455b6

Please sign in to comment.