升级到Kiwi 5.3.1后,无法通过Kiwi TCMS Python API创建测试运行

时间:2018-09-10 19:10:47

标签: kiwi-tcms

计算机运行脚本的环境:Windows 10,Python 3.6.5,tcms-api 5.0

此Python代码段可以针对我的Kiwi 5.3实例创建测试运行:

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)

但是,在将Kiwi升级到5.3.1之后,在同一行上运行的同一代码段执行创建测试运行的行后,会产生此错误调用堆栈:

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'">

无论我是否在testRunSettings中包括“ product_version”,以及在升级Kiwi之前和之后创建的测试计划时,都会发生这种情况。我还验证了没有新版本的Python客户端API。

我正在使用发布的图像在Windows 2016服务器上的docker容器中运行Kiwi。

1 个答案:

答案 0 :(得分:0)

供以后参考: 这是https://github.com/kiwitcms/Kiwi/issues/522,已在master分支中修复,并将在6.0版中发布。