Testlink api python

2024-05-23 23:16:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用TestLink API Python客户端来处理TestLink应用程序API。因此,我需要使用execution_type = 1execution_type = 2获取TestSuite的所有测试用例,以计算自动和手动测试的数量(当执行类型=1时,它是手动测试,当执行类型=2时,它是自动测试)。 为此,我使用了库getTestCasesForTestSuite(testsuite["id"], True, "full", getkeywords=True)中的下一个方法作为我得到问题的结果:

  Traceback (most recent call last):
File "C:/Users/user1/PycharmProjects/script_for_testlink/script_for_testlink.py", line 871, in <module>
result = getAutomatedTestcasesForProject(TESTLINK_API_URL, TESTLINK_API_DEVKEY, project_in_testlink)

File "C:/Users/user1/PycharmProjects/script_for_testlink/script_for_testlink.py", line 112, in getAutomatedTestcasesForProject
testcases_for_testsuites = testlink.getTestCasesForTestSuite(testsuite["id"], True, "full", getkeywords=True)

File "C:\Users\user1\TAF\venv\lib\site-packages\testlink\testlinkdecorators.py", line 140, in wrapperReplaceTLResponseError
response = methodAPI(self, *argsPositional, **argsOptional)

File "C:\Users\user1\TAF\venv\lib\site-packages\testlink\testlinkdecorators.py", line 112, in wrapperAddDevKey
return methodAPI(self, *argsPositional, **argsOptional)

File "C:\Users\user1\TAF\venv\lib\site-packages\testlink\testlinkdecorators.py", line 100, in wrapperWithArgs
*argsPositional, **argsOptional)

File "C:\Users\user1\TAF\venv\lib\site-packages\testlink\testlinkapigeneric.py", line 1517, in callServerWithPosArgs
response = self._callServer(methodNameAPI, argsOptional)

File "C:\Users\user1\TAF\venv\lib\site-packages\testlink\testlinkapigeneric.py", line 1992, in _callServer
response = getattr(self.server.tl, methodNameAPI)(argsAPI)

File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 1117, in __call__
return self.__send(self.__name, args)

 File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 1457, in __request
verbose=self.__verbose

File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 1159, in request
return self.single_request(host, handler, request_body, verbose)

 File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 1175, in single_request
return self.parse_response(resp)

File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 1345, in parse_response
p.close()

File "c:\users\user1\appdata\local\programs\python\python37\Lib\xmlrpc\client.py", line 453, in close
parser.Parse(b"", True) # end of data
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5186, column 0

我怎样才能获得带有字段execution_type的测试用例而不出现问题


Tags: inpyselfliblocallineusersappdata