- self.out.append({'testCase': {
- 'testId': test_id,
- 'testStatus': test_status,
- 'workerThreads': workers,
- 'workerThreadsPerNic': workers_per_nic,
- 'testTags': [tag for tag in test.tags],
- 'l2FrameSize': {'value': framesize,
- 'units': 'Bytes'},
- 'throughput': {'value': throughput,
- 'units': throughput_units},
- 'vDevice': {'version': self.vDeviceVersion}}})
-
-
-def parse_tests(xml_file, vDeviceVersion):
- """Parser result of robot output file and return.
-
- :param xml_file: Output.xml from robot run.
- :param vDeviceVersion: vDevice version.
- :type xml_file: file
- :type vDeviceVersion: str
-
- :return: JSON formatted output.
- :rtype: dict
- """
+ test_elem = ET.SubElement(self.root,
+ test.parent.name.replace(" ",""))
+ test_elem.attrib['name'] = test.parent.name
+ test_elem.attrib['workerthreads'] = workers
+ test_elem.attrib['workerspernic'] = workers_per_nic
+ test_elem.attrib['framesize'] = framesize
+ test_elem.attrib['tags'] = ', '.join(tags)
+ test_elem.text = test.message.split(' ')[1]