diff --git a/launchable/test_runners/robot.py b/launchable/test_runners/robot.py index 81f7f6efc..f2ba130f2 100644 --- a/launchable/test_runners/robot.py +++ b/launchable/test_runners/robot.py @@ -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 diff --git a/tests/data/robot/record_test_executed_only_one_file_result.json b/tests/data/robot/record_test_executed_only_one_file_result.json index 2211ea60e..5d3f191f8 100644 --- a/tests/data/robot/record_test_executed_only_one_file_result.json +++ b/tests/data/robot/record_test_executed_only_one_file_result.json @@ -14,7 +14,7 @@ ], "duration": 0.001, "status": 0, - "stdout": "", + "stdout": "0 != -1", "stderr": "0 != -1", "data": null }, @@ -58,6 +58,6 @@ "testRunner": "robot", "group": "", "noBuild": false, - "flavors": [], - "testSuite": "" + "testSuite": "", + "flavors": {} } diff --git a/tests/data/robot/record_test_result.json b/tests/data/robot/record_test_result.json index e9a327c36..325740346 100644 --- a/tests/data/robot/record_test_result.json +++ b/tests/data/robot/record_test_result.json @@ -14,7 +14,7 @@ ], "duration": 0.002, "status": 0, - "stdout": "", + "stdout": "0 != -1", "stderr": "0 != -1", "data": null }, @@ -68,7 +68,7 @@ ], "duration": 0.001, "status": 0, - "stdout": "", + "stdout": "0 != -1", "stderr": "0 != -1", "data": null }, @@ -112,6 +112,6 @@ "testRunner": "robot", "group": "", "noBuild": false, - "flavors": [], - "testSuite": "" + "testSuite": "", + "flavors": {} }