TestingDocs.com
Software Testing website
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions

TestLink API

Tweet
Pin it

Document Contents

  • TestLink API Introduction
  • Pre-requisites
  • Web vs Webservice
  • Enabling API
  • Generating an API Key
  • TestLink REST API Guide
  • API Usage

TestLink API Introduction

TestLink API lets to communicate with TestLink and allows you to perform internal actions without login into the TestLink Web UI interface. You can make use of the API to communicate with TestLink using XML-RPC or REST API. API allows us to interact with TestLink in an automated fashion without manual actions like browser clicks etc.

Pre-requisites

Install the TestLink Instance.

Please note that this API documentation is based on the TestLink version 1.9.x and TestLink REST API version v2.

Windows

https://www.testingdocs.com/testlink-installation-on-windows/

Linux

https://www.testingdocs.com/testlink-install-on-linux/

To execute TestLink Rest API calls, we need to have Testlink Web Application up and running without any issues.

Slim Framework

TestLink Rest API depends on the Slim framework. This framework should be installed on the TestLink instance box.

https://www.testingdocs.com/install-slim-framework-on-windows/

Testing Tool

A testing tool to execute and test the API calls. For example, Postman tool

https://www.testingdocs.com/postman-api-tool/

Apache Configuration

https://www.testingdocs.com/testlink-rest-api-apache-server-configuration/

Web vs Webservice

Web and Webservices differ in the use cases. Web TestLink communication vs REST API communication.

 

TestLink API Architecture

 

Enabling API

Before using the API client, we need to enable the API interaction server side. To do this, open the Testlink folder and edit the config.inc.php file.

You can make sure that the API switch is enabled as below. If you modify it save the config file and restart the Apache server to reflect the changes made.

$tlCfg->api->enabled = TRUE;

Generating an API Key

  • Click on My Settings link on the TestLink page.
  • Click on the Generate a new key button in the API Interface box.

 

Generate a new key TestLink

 

  • We can see that an API access key will be displayed on the web page as shown in the picture.

 

Generate TestLink API Key

TestLink REST API Guide

https://www.testingdocs.com/testlink-rest-api-guide/

API Usage

We can create an API client with API key and POST URL as parameters. For example, the API URL on localhost is :

http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php

We can instantiate the API client bypassing the API key and the URL that accepts POST requests on the server as shown below.

 

String POST_URL="http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php";

String API_KEY="e501adb770e1ac2b7fe3800053ad0979";

TestLinkAPIClient api=new TestLinkAPIClient(API_KEY, POST_URL);

More information on TestLink Open source Test management tool can be found on the official website at: http://testlink.org

Related Posts

TestLink /

TestLink Bitnami Cloud Image

TestLink /

TestLink REST API Apache Server Configuration

TestLink /

How to fix Fatal Error: Maximum execution time of 30 seconds exceeded in date_api.php

TestLink /

Clone Testlink GitHub repository on Linux

Create a TestLink Test Project

TestLink /

Create a TestLink Test Project

Tag Cloud

Agile Appium Tutorials C++ Eclipse Tutorials Git Tutorials IntelliJ Tutorials Java Java Tutorial JBehave Jenkins Jira Cloud JUnit Tutorial Maven Object-oriented Flowchart Python Tutorials Raptor Flowcharts Selenium IDE TestLink Tutorials

Random Posts

  • TestLink Bitnami Cloud Image
    Overview In this tutorial, we will see the steps

    Read more

  • Code Coverage Tools
    Overview Let’s look at some of the code coverage

    Read more

  • pCloudy Continuous Testing Cloud
    Overview pCloudy is a continuous testing cloud

    Read more

Latest Tweets

Tweets by @TestingDocs

Back to Top

TestingDocs.com

  • Privacy Policy
  • Cookie Policy
  • JBehave
  • Selenium
  • Testlink
  • Maven
  • Git
  • RAPTOR
  • Questions
www.TestingDocs.com | All Rights Reserved