Presentation
TestLink enables easily to create and manage Test cases as well as organize them into Test plans. These Test plans allow team members to execute Test cases and track test results dynamically, generate reports, trace software requirements, prioritize and assign tasks.
The tool has web based interface with PHP and background database MySQL, Postgres or MS-SQL. It cooperates with known Bug tracking systems as is Bugzilla, Mantis, etc.
TestLink is web based tool under the GPL license (free to use). The project is maintained by Open community of testers. Many developers on the team hold Quality Assurance Management positions and understand the needs of QA teams. Improve your testing processes and lifecycle with us. TestLink makes Testing process easy and organized.
Installation Guide
Get testlink sources
Go to the http://sourceforge.net/projects/testlink/files/ and choose the version to Install
Install dependencies
$ sudo apt-get install php5 php5-ldap php5-gd php5-pgsql postgresql-8.3
Unpackage testlink_1.8.5b.tgz
$ tar -xzvf testlink_1.8.5b.tgz
copy unpackaged folder to /var/www
# cp -R /tmp/testlink/testlink /var/www/1.8.5
Attribute rights to apache user (www-data)
# chown -R www-data:www-data /var/www/1.8.5
Change variables values in /etc/php5/apache2/php.ini
$ sudo vim /etc/php5/apache2/php.ini # update the variables to get the following content
memory_limit = 64M
max_execution_time = 120
session.gc_maxlifetime = 2400
post_max_size = 8M
Restart apache
$ sudo /etc/init.d/apache2 restart
Web Installation
- Access with navigator to address :http://localhost/1.8.5/install/index.php)
- Choose New-installationverify if everything is OK
- Proceed to database configuration
- Accept the licences and press on proceed
- Update: The default username and password for the Testlink portal is admin/admin.
Delete install folder
- rm -vfR /var/www/1.8.5/install
Configuration
Update the following file :/var/www/1.8.5/config.inc.php
# vim /var/www/1.8.5/config.inc.php
****file lines to change*****
$tlCfg->config_check_warning_mode = 'FILE';
$g_smtp_host = '172.16.60.154:25'; # SMTP server MUST BE configured
# Configure using custom_config.inc.php
$g_tl_admin_email = 'wissem.mediouni@sungard.com'; # for problem/error notification
$g_from_email = 'admin@testlink-sungard.com'; # email sender
$g_return_path_email = 'noreply@testlink-sungard.com';
...
$tlCfg->repository_max_filesize = 8; //MB
$tlCfg->import_max_size = '8388608'; // in bytes
...
$tlCfg->username_format = '%login% %first% %last%';
...
$tlCfg->user_self_signup = FALSE;
Configure LDAP parameters in /var/www/1.8.5/config.inc.php
$tlCfg->authentication['method'] = 'LDAP';
/** LDAP authentication credentials */
$tlCfg->authentication['ldap_server'] = 'ServerIPAdress';
$tlCfg->authentication['ldap_port'] = '389';
$tlCfg->authentication['ldap_version'] = '3'; // could be '2' in some cases
$tlCfg->authentication['ldap_root_dn'] = 'ou=people,dc=com,dc=entreprise';
$tlCfg->authentication['ldap_organization'] = ' '; // e.g. '(organizationname=*Traffic)'
$tlCfg->authentication['ldap_uid_field'] = 'uid'; // Use 'sAMAccountName' for Active Directory
$tlCfg->authentication['ldap_bind_dn'] = ' '; // Left empty for anonymous LDAP binding
$tlCfg->authentication['ldap_bind_passwd'] = ' '; // Left empty for anonymous LDAP binding
Overview of main configuration files and folders
- config.inc.php : the main configuration file
- config_db.inc.php : file containing database parameters (db-user, db-password ...)
- upload_area/ : folder containing uploaded files, it's important to remember this folder while backuping data
- cfg/ : folder containing several tools links configuration files (like bugzilla)
How add execution result type
To add an execution result Type you have to modify this file : /var/www/1.8.5/custom_config.inc.php
Step 1 : uncomment (or add) this section :
$tlCfg->results['status_code'] = array (
"failed" => 'f',
"blocked" => 'b',
"passed" => 'p',
"not_run" => 'n',
"not_available" => 'x',
"unknown" => 'u'
// "all" => 'a'
);
/**
* Used to get localized string to show to users
* Order is important, because this will be display order on GUI
* key: status
* value: id to use with lang_get() to get the string, from strings.txt (or custom_strings.txt)
*/
$tlCfg->results['status_label'] = array(
"not_run" => "test_status_not_run",
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked",
// "all" => "test_status_all_status",
"not_available" => "test_status_not_available"
"unknown" => "test_status_unknown"
);
Step 2 : add this line "not_available" => "test_status_not_available" in this section to display NOT AVAILABLE status in execution testlink tab
// Is RIGHT to have this DIFFERENT from $tlCfg->results['status_label'],
// because you must choose to not allow some of previous status be available
// on execution page.
// See this as a subset of $tlCfg->results['status_label']
//
// Used to generate radio and buttons at user interface level.
// Order is important, because this will be display order on User Interface
//
// key => verbose status as defined in $tlCfg->results['status_code']
// value => string id defined in the strings.txt file,
// used to localize the strings.
//
$tlCfg->results['status_label_for_exec_ui'] = array(
"not_run" => "test_status_not_run",
"passed" => "test_status_passed",
"failed" => "test_status_failed",
"blocked" => "test_status_blocked",
"not_available" => "test_status_not_available"
"unknown" => "test_status_unknown"
);
$tlCfg->results['default_status'] = "not_run";
How to activate sending mail instantly
To activate sending mail instantly you have to modify this file : /var/www/1.8.5/custom_config.inc.php (as root)
change the value of this variable $g_mail_priority as follow
# Urgent = 1, Not Urgent = 5, Disable = 0
$g_mail_priority = 1;
If : value = 5 ==> mail will be sent at midnight value = 1 ==> mai will be sent instantly value = 0 =>functionnality is disabled
How to set The entreprise logo instead of testlink logo
1- Copy logo image into /var/www/<testlink_folder>/gui/themes/default/images/
2- Change the value of this variable in /var/www/<testlink_folder>/config.inc.php
$tlCfg->company_logo = 'Logo_entreprise.jpg';
How to change username displayed format
Change the value of the variable $tlCfg->username_format in /var/www
/<testlink_folder>/config.inc.php
$tlCfg->username_format = '%first% %last% %login%';
Knowing that :
'%first% %last%' -> Wissem MEDIOUNI
'%last%, %first%' -> MEDIOUNI Wissem
'%first% %last% %login%' -> Wissem MEDIOUNI [gxxxxxx]
How to Enable/disable users to create accounts on login page
Change the value of variable $tlCfg->user_self_signup in /var/www/1.8.5/config.inc.php from True to False
$tlCfg->user_self_signup = FALSE;
How to order testcases
Change the value of the variable $tlCfg->gui->tprojects_combo_order_by in /var/www/<testlink_folder>/config.inc.php
$tlCfg->gui->tprojects_combo_order_by='ORDER BY name';
Two possible values :
'ORDER BY name' 'ORDER_BY nodes_hierarchy.id DESC' -> similar effect to order last created firts
How to allow level depth of requirement tree
Change the value of the variable $tlCfg->req_cfg->child_requirements_mgmt in /var/www/<testlink_folder>/config.inc.php
$tlCfg->req_cfg->child_requirements_mgmt = ENABLED;
two possible values : ENABLED: allow N level depth tree DISABLED: just one level
How to set the default role used for new users as No rights
Change the value of the variable $tlCfg->default_roleid in /var/www/<testlink_folder>/config.inc.php
$tlCfg->default_roleid = TL_ROLES_NO_RIGHTS;