aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-04-16 09:09:06 -0500
committerLovett, Trevor (tl2972) <tl2972@att.com>2019-04-16 09:09:06 -0500
commit0018ec512d41f3609394414420bbb39deaa0d7e4 (patch)
tree460eb97bbdea017a710d2edc375a9459f8dba93a /ice_validator
parente5d7862c7c6c02847b8b4f95d2af0c5e9a454828 (diff)
[VVP] Reports show test file and case now
Change-Id: I017c1830b61b186f52ba2fe29db03dd41cb68b26 Issue-ID: VVP-192 Signed-off-by: Lovett, Trevor (tl2972) <tl2972@att.com>
Diffstat (limited to 'ice_validator')
-rw-r--r--ice_validator/tests/conftest.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py
index 88dc6b3..07a66f2 100644
--- a/ice_validator/tests/conftest.py
+++ b/ice_validator/tests/conftest.py
@@ -196,6 +196,13 @@ class TestResult:
return self.item.function.__module__.split(".")[-1]
@property
+ def test_id(self):
+ """
+ :return: ID of the test (test_module + test_case)
+ """
+ return "{}::{}".format(self.test_module, self.test_case)
+
+ @property
def raw_output(self):
"""
:return: Full output from pytest for the given test case
@@ -525,7 +532,7 @@ def generate_csv_report(output_dir, categories, template_path, failures):
rows.append(
[
"\n".join(failure.files),
- failure.test_module,
+ failure.test_id,
failure.requirement_text(reqs),
failure.resolution_steps(resolutions),
failure.error_message,
@@ -589,7 +596,7 @@ def generate_excel_report(output_dir, categories, template_path, failures):
# table content
for row, failure in enumerate(failures, start=start_error_table_row + 2):
worksheet.write(row, 0, "\n".join(failure.files), normal)
- worksheet.write(row, 1, failure.test_module, normal)
+ worksheet.write(row, 1, failure.test_id, normal)
worksheet.write(row, 2, failure.requirement_text(reqs), normal)
worksheet.write(row, 3, failure.resolution_steps(resolutions), normal)
worksheet.write(row, 4, failure.error_message, normal)
@@ -808,7 +815,7 @@ def generate_html_report(outpath, categories, template_path, failures):
fail_data.append(
{
"file_links": make_href(failure.files),
- "test_id": failure.test_module,
+ "test_id": failure.test_id,
"error_message": failure.error_message,
"raw_output": failure.raw_output,
"requirements": docutils.core.publish_parts(