New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating test run via API after upgrade to 5.3.1 #522

stmanke opened this Issue Sep 14, 2018 · 0 comments


None yet
1 participant

stmanke commented Sep 14, 2018

Description of problem

Python code that worked with 5.3 to create a test run against an existing test plan fails after upgrade to Kiwi 5.3.1. Kiwi is being run in docker containers with the latest images. No configuration changes have been made to the machine running the script (Win10, python 3.6.5, tcms-api 5.0)

Component (web, API, etc)


Version or commit hash (if applicable)

Kiwi 5.3.1, tcms-api 5.0

How often reproducible


Steps to Reproduce

  1. Run code snippet below in a python file/environment configured to connect to Kiwi instance, updating plan_id as needed:
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)

Actual results

Error call stack:

File "[redacted]", line 34, in main myRun = kiwi.exec.TestRun.create(testRunSettings) 
File "C:\Program Files\Python36\lib\xmlrpc\", line 1112, in __call__ return self.__send(self.__name, args)
File "C:\Program Files\Python36\lib\xmlrpc\", line 1452, in __request verbose=self.__verbose
File "C:\Program Files\Python36\lib\xmlrpc\", line 1154, in request return self.single_request(host, handler, request_body, verbose)
File "C:\Program Files\Python36\lib\xmlrpc\", line 1170, in single_request return self.parse_response(resp)
File "C:\Program Files\Python36\lib\site-packages\tcms_api\", line 39, in parse_response return super().parse_response(response)
File "C:\Program Files\Python36\lib\xmlrpc\", line 1342, in parse_response return u.close()
File "C:\Program Files\Python36\lib\xmlrpc\", line 656, in close raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32603: "Internal error: 'product_version'">

Expected results

Test run successfully created.

Additional info

I saw that TestRun-product_version is going to be removed, but I expected this version of Kiwi to still support it. Removing the 'product_version' entry from the dict parameter does not change the result. Nor does running the script against a test plan created after upgrading Kiwi.

atodorov added a commit that referenced this issue Sep 18, 2018

Don't use product_version when creating TestRun via API. Fix #522

'product' is no longer required
'product_version' is no longer required
'manager' and 'default_tester' can be usernames or IDs

@atodorov atodorov closed this in c12139a Sep 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment