TestLink 1.8 brings possibility to easily integrate your test scripts with TestLink to collect results in.
This interface is new functionality and could be marked as experimental. We will be pleasure if you report bugs via our - Configure TestLink to enable the feature:
- You can generate personal key from User personal page.
- See one of the client implementation samples to see how to interact with the API.
Client support
Sample client implementations are available in PHP, Ruby, Python, and Java. See testlink/lib/api/sample_clients/. There is also generated API Documentation via php documentator.
Contributed by Stephen Meyn
Technical information
API URL is /lib/api/xmlrpc.php . TestLink identify a request authorization via "developer_key" (added into database per user). Import of TC execution results is probably the most wanted method. We works on extend more features via this API continously. For this reason the next table is not fully current.
List of important methods:
| Method | Description |
| checkBuildID | check if the ID exists for a Build |
| checkGuess | |
| checkStatus | |
| checkTCID | check if the ID exists for a Test Case |
| checkTestCaseName | check if exists Test Case with a defined Title |
| checkTestProjectID | check if the ID exists for a Test Project |
| checkTestSuiteID | check if the ID exists for a Test Suite |
| checkTPID | check if the ID exists for a Test Plan |
| createBuild | creates a new build associated with a specific test plan |
| createTestCase | |
| getLatestBuildForTestPlan | gets ID of the latest build for a defined Test Plan |
| getProjects | gets a list of all the projects in Testlink |
| getProjectTestPlans | gets the Test Plans for a specific project |
| getTestCaseIDByName | returns the ID of a specific test case based on the name of the test case |
| getTestCasesForTestSuite | lists test cases within a test suite and its child suites or just within a specific suite |
| getTestSuitesForTestPlan | |
| reportTCResult | set a result for a defined Test Case ID and Test Plan ID |
| sayHello | test that TestLink API respond |
| setTestMode | |
| updateTestCase | |
Error codes
See more: <teslink_root>/lib/api/APIErrors.php
| Error code | Explanation |
| -1 | Generic error |
| 1 | Success |
| 100-1000 | Data general error
|
| 2000-2999 | Authentication error |
| 3000-10000 | Data error |