Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anta): Add test categories and description to nrfu report #249

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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