create new tag
, view all tags


TestlinkQueryPlugin is is plugin to integrate Testlink Test Management tool ( http://testlink.sourceforge.net/docs/testLink.php) with TWiki Collaborative Wiki.


With Plugin you can fetch testcase descriptions to TWiki page using macro.


About Plugin Usage

You can fetch data from Testlink database using macros. If you cannot get any information from case you should add case to testplan

Main idea for implementation of plugin was to enable fetch part of testcase information to wiki page. This means that plugin is not complete.. If you need you should do some changes for code..

As an example in "my" system TWiki (NEST Project Platform) is used for Requirement capturing tool where all requirements/Feature descriptions are treated as wiki pages. Forms contains metadata for requirement and this data can be exported as csv file which is importable by Testlink. All requirement wiki pages contain TLQ macro who tries to trace if Testlink has same requirement assigned to some test cases. TWiki-Testlink integration gives possible to trace requirement model to testcase level

Allowed attributes

Attributes are named by some columns in 'requirements' and 'nodes_hierarchy' tables in DB. It means you can use attributes "id" and "title". I.e. if you want to search requirements that are connected to a testcase with id "tc1", use "REQ" in attribute show and "tc1" in attribute id.

There are these 'special' attributes:

  • data - if set to "on" you get directly data from database
  • format - you can specify the output
  • show - you can decide whether to see requirements (if set to "REQ") or testcases (if set to "TC")

Syntax and variables in 'format' attribute

If plugin is used to search for Requirements simply all the columns of the 'requirements' table can be used. Those are the following: id, srs_id, req_doc_id, title, scope, status, type, node_order, author_id, creation_ts, modifier_id and modification_ts.

*an use the same naming conventions as for attributes and put before it the character '$'. If you are listing test cases, also attribute "summary" can be used.


  • format="| $id | $title | $summary |"
1 testcase1 text about testcase1
2 testcase2 text about testcase2
  • format="Testacase $title ($id): $summary"
Testcase 1 (testcase1): text about testcase1
Testcase 2 (testcase2): text about testcase2


%TLQ{data="on" show="TC" title="ReqIdExample"}% %TLQ{data="on" show="TC" id="1"}%


Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %NEWPLUGIN_SHORTDESCRIPTION%

    • Set URL = https://yourhost/ProjectTESTLINK
    • Set FORMAT_REQ = | $id | $title |
    • Set FORMAT_TC = | $id | $project | $testplan | $title | $summary |
    • Set SHORTDESCRIPTION = Display links and data results from Testlink test management tool
    • Set URL_REQ = /lib/req/reqSpecView.php
    • Set URL_TC = /lib/testcases/archiveData.php?edit=testcase
    • Set TESTLINK_DB_HOST = localhost
    • Set TESTLINK_DB_PORT = 3306
    • Set TESTLINK_USER = ReportUser
    • Set TESTLINK_PASSWD = ReportUser
    • Set DEBUG = 0

These settings are adapted from normal TWiki:Plugins/BugzillaQueryPlugin settings.

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.

  • Download the ZIP file from the Plugin Home (see below)
  • Unzip TestlinkQueryPlugin.zip in your twiki installation directory. Content:
File: Description:
data/TWiki/TestlinkQueryPlugin.txt Plugin topic
lib/TWiki/Plugins/TestlinkQueryPlugin.pm Plugin Perl module

  • Configure the Plugin:
    • TWiki 4.0 and up: Run the configure script to enable the Plugin
    • Change the Plugin settings as needed
    • You should create MySQL account which has only read rights for Testlink database tables. eg. ReportUser
    • Test if the installation was successful:

Syntax Rules

  • %TLQ{data="on" show="TC" id="1"}%
  • %TLQ{data="on" show="TC" title="SomeReqTitle"}%
  • %TLQ{data="on" show="REQ" id="1"}%
  • %TLQ{data="on" show="REQ" title="SomeTestcaseTitle"}%

Misc Info

This plugin was created for NEST Project Platform (https://narsus.wordpress.com). Testlink is one of key part of platform

Plugin Info

Plugin Author: TWiki:Main.MarkoRintamaki
Plugin Implementation: Jan Lapinkataja IXONOS PLC
License: GPL (GNU General Public License)
Plugin Version: 20 Oct 2008 (V1.000)
Change History: V1.000 Release for TWIKI org by Jan Lapinkataja
Change History: Code foundation from BugzillaQueryPlugin
20 Oct 2008: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: DBI
Other Dependencies: none
Perl Version: 5.005
Benchmarks: GoodStyle nn%, FormattedSearch nn%, TestlinkQueryPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/TestlinkQueryPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TestlinkQueryPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/TestlinkQueryPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-04-10 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.