Environment of machine running script: Windows 10, Python 3.6.5, tcms-api 5.0
This Python snippet worked to create test runs against my Kiwi 5.3 instance:
targetPlan = kiwi.exec.TestPlan.filter({'plan_id' : 23})[0]
testRunSettings = {
'plan': targetPlan['plan_id'],
'product' : targetPlan['product_id'],
'manager' : targetPlan['owner_id'],
'product_version' : targetPlan['product_version_id'],
'build' : 1,
'summary' : 'Ignore -- sample test run',
'default_tester' : 11
}
myRun = kiwi.exec.TestRun.create(testRunSettings)
However, after upgrading Kiwi to 5.3.1, the same code snippet running on the same machine produces this error call stack after executing the line to create the test run:
File "[redacted]", line 34, in main myRun = kiwi.exec.TestRun.create(testRunSettings)
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 1112, in __call__ return self.__send(self.__name, args)
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 1452, in __request verbose=self.__verbose
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 1154, in request return self.single_request(host, handler, request_body, verbose)
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 1170, in single_request return self.parse_response(resp)
File "C:\Program Files\Python36\lib\site-packages\tcms_api\xmlrpc.py", line 39, in parse_response return super().parse_response(response)
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 1342, in parse_response return u.close()
File "C:\Program Files\Python36\lib\xmlrpc\client.py", line 656, in close raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32603: "Internal error: 'product_version'">
This happens whether or not I include 'product_version' in the testRunSettings and with test plans created both before and after upgrading Kiwi. I also verified there wasn't a new version of the Python client API.
I'm running Kiwi in docker containers on a Windows 2016 server using the published images.
For future reference: this is https://github.com/kiwitcms/Kiwi/issues/522 which has been fixed in master branch and will be released with version 6.0.