Skip to content
Draft
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions launchable/test_runners/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ def parse_suite(suite: ET.Element):
"time": str(duration.total_seconds()) if duration is not None else '0',
})

if status_node is not None:
out = ET.SubElement(testcase, 'system-out')
out.text = status_node.text if status_node.text else ''

if status == "FAIL":
failure = ET.SubElement(testcase, 'failure')

msg = test.find('kw/msg')
failure.text = msg.text if msg is not None else ''
msgs = []
for msg in test.findall('kw/msg'):
if msg is not None and msg.text is not None:
msgs.append(msg.text)
failure.text = "\n".join(msgs) if msgs else ''
if status == "NOT_RUN" or nested_status == 'NOT_RUN':
skipped = ET.SubElement(testcase, "skipped") # noqa: F841

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"duration": 0.001,
"status": 0,
"stdout": "",
"stdout": "0 != -1",
"stderr": "0 != -1",
"data": null
},
Expand Down Expand Up @@ -58,6 +58,6 @@
"testRunner": "robot",
"group": "",
"noBuild": false,
"flavors": [],
"testSuite": ""
"testSuite": "",
"flavors": {}
}
8 changes: 4 additions & 4 deletions tests/data/robot/record_test_result.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"duration": 0.002,
"status": 0,
"stdout": "",
"stdout": "0 != -1",
"stderr": "0 != -1",
"data": null
},
Expand Down Expand Up @@ -68,7 +68,7 @@
],
"duration": 0.001,
"status": 0,
"stdout": "",
"stdout": "0 != -1",
"stderr": "0 != -1",
"data": null
},
Expand Down Expand Up @@ -112,6 +112,6 @@
"testRunner": "robot",
"group": "",
"noBuild": false,
"flavors": [],
"testSuite": ""
"testSuite": "",
"flavors": {}
}
Loading