TestLink is an open source test management tool.
It allows you to create test project, composed of test plans, test suites, test cases.
It also manage requirements, and builds, Platforms …
Finally, it can generate a set of metrics and reports to track test coverage, test campaigns, found defects…
TestLink offers the ability to automate a number of transactions through an API that uses the XML-RPC protocol.
For the Jinfeng project, I had the need to use the TestLink API with the Python language, which is one of the components chosen to develop Jinfeng.
The main idea of Jinfeng is to create a testing platform for performing all stages of the industrialization of testing (deploys environments, installation of AUT, testing documentation management, testing execution management, load / functional / technical / etc …, metrics and reporting, defect tracking), all of this automatically, and if possible by using natural language commands. Each of these tasks being performed by different open source tools, the link is achieved by a “core” written in Python. Use the same language for all of the platform seems to be one of the conditions essential to the success of this project.
I was unable to find a complete open source library in Python to access the TestLink API, so I was forced to start the development myself.I make it available as open source on github for anyone who wants to improve their use of TestLink by automating tasks with Python.
The library (TestLinkAPI.py) is available here:
I also provided an example of using, to create:
– A new project
– A test plan
– 3 test suites
– Two test cases, each consisting of 5 steps test
In a future article, I will detail the contents of the library and its operation.
Thanks to:Bruno P. Kinoshita (for its development of the API in Java)
James Stock (for the ‘draft’ which inspired me: Testlink-api-python-client R7)