问题:
使用Testlink api 要求添加devKey如下:
参见:https://github.com/lczub/TestLink-API-Python-client/blob/master/doc/usage.rst
使用Testlink api 要求添加devKey如下:
参见:https://github.com/lczub/TestLink-API-Python-client/blob/master/doc/usage.rst
[PYENV]\testlink\Scripts\activate set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php set TESTLINK_API_PYTHON_DEVKEY=[Users devKey generated by TestLink] python >>> import testlink >>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient) >>> tls.countProjects()
解决:
add:http://www.softwaretestingconcepts.com/test-automation-using-testlink-xmlrpc-api-steps-and-sample-python-client-program
Steps to enable Testlink API via xmlrpc and generate dev key:
- Open config.inc.php
- Search for /** XML-RPC API availability (disabled by default) */ $tlCfg->api->enabled = FALSE;
- Change FALSE to TRUE $tlCfg->api->enabled = TRUE;
- Save config.inc.php
- Login to Testlink UI as admin
- Go to 'My Settings'
- Under API interface, click 'Generate new key'
- Copy the key generated
- Substitute your newly generated devKey in the client program Example: client = TestlinkAPIClient(devKey="abc04556463cd813a1ea05caf042d42f")
This should be sufficient for a test the Testlink xmlrpc API client server communication. You can then go ahead and use the client program as a library to be called from within your python test scripts (talking from a Selenium python user perspective). You could do similar implementation with other scripts.Hope you find this useful.
没有评论:
发表评论