I have a number of legacy tests (8000+) that produce xunit output. The test case class and classname are sometimes very long. I end up running into the following error:
Traceback (most recent call last):
File "/usr/local/bin/tcms-junit.xml-plugin", line 11, in <module>
main(sys.argv)
File "/usr/local/lib/python3.9/site-packages/tcms_junit_plugin/__init__.py", line 77, in main
plugin.parse(argv[1])
File "/usr/local/lib/python3.9/site-packages/tcms_junit_plugin/__init__.py", line 31, in parse
test_case, _ = self.backend.test_case_get_or_create(summary)
File "/usr/local/lib/python3.9/site-packages/tcms_api/plugin_helpers.py", line 448, in test_case_get_or_create
test_case = [self.rpc.TestCase.create({
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
return self.__send(self.__name, args)
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1456, in __request
response = self.__transport.request(
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1160, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1176, in single_request
return self.parse_response(resp)
File "/usr/local/lib/python3.9/site-packages/tcms_api/xmlrpc.py", line 41, in parse_response
return super().parse_response(response)
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 1348, in parse_response
return u.close()
File "/usr/local/lib/python3.9/xmlrpc/client.py", line 662, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32603: "Internal error: [('summary', 'Ensure this value has at most 255 characters (it has 293).')]">
I have a number of legacy tests (8000+) that produce xunit output. The test case class and classname are sometimes very long. I end up running into the following error:
Is it possible to automatically trim the summary to 255 characters here: https://github.com/kiwitcms/junit.xml-plugin/blob/master/tcms_junit_plugin/__init__.py#L29