Jul 06

Test Management using TestLink – Pt IV

Continuing where we left off last time, let’s add an issue tracker to our management system. TestLink supports many popular issue tracking systems including Bugzilla, JIRA and Mantis. In this tutorial we’ll configure TestLink to use Mantis. First of all, download and install Mantis, check out any of the multitude of tutorials on the web if you run into trouble.

Once that’s done head over to the Issue Tracker Management section in TestLink. Hit create and give your tracker a name. Select the mantis (Interface: soap) type and paste the following configuration in the textbox:

<!-- Template mantis soap Interface -->
<!-- You Do not need to configure uriwsdl,uriview,uricreate -->
<!-- if you have done Mantis standard installation -->
<!-- In this situation DO NOT COPY these config lines -->
<!-- Configure This if you want be able TO CREATE ISSUES -->
<!-- Configure This if you want NON STANDARD BEHAVIOUR for considered issue resolved -->

I’ve put things you probably need to edit to match your settings in bold.

We still need to activate the issue tracker integration for our project, you can do so on the Test Project Management page. Tick the box next to “Active” and select mantis from the dropdown. When you go to Execute Tests you can see BUG management with two links, one to link an existing bug/issue using its Mantis bug ID and a second to create a new issue in Mantis.

Version 1.9.13 of TestLink does not give you any feedback when you hit Save (aside from throwing errors when you don’t fill in a description). If the page does not refresh automatically, just click on the given test again and the linked bug will appear.

Issue Tracking

Issue Tracking

If you have several of these, there’s a nice little overview in the Reports and Metrics section as well.

Bug Report

Bug Report

Clicking any of the bugs will take you directly to its respective Mantis page. The input in TestLink is quite limited which means you probably want to add additional information regarding the issue in Mantis.

Thanks to the integration with an issue tracker you can quickly file bugs while you’re busy executing tests, reducing the chance you forget about an issue you’ve encountered. As an added bonus, TestLink will also store on what build you filed this bug so the developer who will try to fix it can trace it back to a specific point in time and try to recreate it.

We’re coming to a close very soon! Let’s see what we’ve got so far:

  1. Requirement tracing
  2. Test Case management
  3. Automatic execution of a Test Plan using Jenkins
  4. Issue Tracking using Mantis

With all of this you’ve already accomplished quite an extraordinairy amount of tracking and tracing! But what if you do not use Jenkins and still want automatic reporting of test results? Next time we’ll take a look at the Python module that can interface with TestLink’s API.

May 09

Test Management using TestLink – Pt I

I’ve been using TestLink for a while now and would like to share some of the knowledge I’ve gained during this period. In this tutorial series I’ll tackle the whole process from start to finish to set up a system that uses TestLink for Requirements and Test Project/Plan/Case management along with Test Plan execution using Jenkins.

Topics we’re going to handle include

  • Setting up TestLink
  • Creating content in TestLink (Projects, Plans, Requirements, Test Cases, …)
  • Issue Tracker integration
  • Pulling your Test Plan into Jenkins for test executions
  • Pushing the results back to TestLink

What I’ll be using in this tutorial is

If you do not have access to a webhost that has MySQL (or MSSQL) and an up to date version of PHP you’ll also want to install a webserver on your own PC (or your Jenkins machine) for experimenting purposes. In case you are not familiar with setting up a webserver or database I’d recommend you get

It doesn’t really matter what version of the software mentioned you get. Jenkins seems to release update very frequently while TestLink gets about a new release per quarter. Things might be slightly different in newer versions but it shouldn’t be a problem to follow the tutorial.

Let’s get started installing TestLink! Surf to the location of your TestLink instance, if you’re doing this on your own computer it’s probably something along the lines of http://localhost/testlink1_9_13/, you’ll be greeted by this page

TestLink Install

If you’re doing a fresh install just hit the “New Installation” link and agree to the license agreement. The following page checks if your setup meets the requirements. If you’re running this on your own computer you might need to resolve write access issues before being able to continue.

TL Install requirment check

Next we need to configure the database access. Select which DBMS you want to use (I’ll be using MySQL in this tutorial). Enter a user with enough “admin” rights and fill in a username and password which TestLink will use to access the database (this is NOT your login info for TestLink itself. Default credentials are admin/admin). Let’s continue!

Install report

In the case that TestLink could not write your config file, you’ll have to manually create the file and paste the given contents into it. Now everything is set up, browse to the root TestLink URL and you’ll be presented with a login screen.

Note that you can do a whole lot of configuration in TestLink but it’s not accessible in the GUI. You need to open up config.inc.php in a text editor and manually change the values there. I suggest you scroll through it and have a look what you can do. To be safe, make a backup of the file before you start editting it.

Some default behaviour I liked changing included the following

  • Change the path of the upload directory and log files
 $g_repositoryPath = '/var/testlink/upload_area/'; /* unix example */
 $tlCfg->log_path = '/var/testlink/logs/'; /* unix example */
  • Do not hide the available actions on pages by changing the value to inline
 $tlCfg->gui->op_area_display->test_spec_container = 'none'; // ''
 $tlCfg->gui->op_area_display->test_case = 'none'; // 'inline'
 $tlCfg->gui->op_area_display->req_spec_container = 'none'; // 'inline'
 $tlCfg->gui->op_area_display->req = 'none'; // 'inline'

There are many, many more things that are possibly a good idea to change depending on your needs, just keep in mind that all of these settings are in this file for future reference.

Congratulations! You’ve just installed and configured TestLink. When you log in you’ll be asked to create a Test Project before you can continue. I’ll be talking about this and more in the next tutorial.