Skip to content

Commit 1c7942e

Browse files
author
Shiva Adirala
committed
Include error message in test metrics
1 parent 3cb7a5f commit 1c7942e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

robotframework_metrics/robotmetrics.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@ def generate_report(opts):
523523
th.string = "Time (s)"
524524
tr.insert(3, th)
525525

526+
th = soup.new_tag('th')
527+
th.string = "Error Message"
528+
tr.insert(4, th)
529+
526530
test_tbody = soup.new_tag('tbody')
527531
table.insert(11, test_tbody)
528532

robotframework_metrics/test_results.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@ def visit_test(self, test):
3636

3737
table_td = self.soup.new_tag('td')
3838
table_td.string = str(test.elapsedtime / float(1000))
39-
table_tr.insert(3, table_td)
39+
table_tr.insert(3, table_td)
40+
41+
table_td = self.soup.new_tag('td', style="word-wrap: break-word;max-width: 250px; white-space: normal;")
42+
table_td.string = str(test.message)
43+
table_tr.insert(4, table_td)

0 commit comments

Comments
 (0)