This is a complete guide to start using the most popular open source test management tool – TestLink.
Editors’ Note – If you are still using MS Excel spreadsheets for tracking test cases and execution, this is the best time for you to switch to a Test Management tool. And for that reason, we have selected the long-time popular open source test management tool. Try it!
We have divided this TestLink Tutorials series into 3 parts:
Here is the list of all the tutorials in this series:
TestLink Tutorial #1) TestLink introduction, installation and creating Test Plan and Test Cases
TestLink Tutorial #2) Requirements management, Test execution and generating test reports
TestLink Tutorial #3) Updating test case execution status remotely i.e. through Selenium WebDriver code using TestLink API (Advanced concepts)
TestLink Tutorial #4) Test Metrics, Keyword Management, Custom Fields and Test Report Charts
Let’s start with the 1st part in this series.
What is covered in Tutorial #1:
- Introduction to TestLink
- TestLink Installation
- Creating Test Project
- Creating Test Plan
- Creating Build
- Creating Test Suite
- Creating Test Case
- Assigning Test Case to Test plan
What You Will Learn:
- Introduction to TestLink
- Benefits of TestLink
- TestLink Installation
- Installation of Apache:
- Installation of PHP
- Installation of MySQL
- Installation of TestLink
- Creating a Test Project
- Creating Test plan
- Build Creation
- Creating Testsuite
- Creating a Testcase
- Assigning Testcase to Test Plan
- Recap of what we learned in this tutorial:
Introduction to TestLink
This is most widely used the web-based open source test management tool. It integrates both requirements specification and Test specification together. The user can create test projects and document test cases using this tool. We can create an account for multiple users/testers and assign different user roles. Admin user can manage test cases assignment task.
It supports both manual and automated execution of Test cases. With this tool, the testers can generate Test Report and Test Plan Documents within a minute. It supports the generation of Test reports in MS Word, Excel and HTML formats.
TestLink also supports integration with many popular Defect Tracking systems like Mantis, BugZilla, Jira, Youtrack and TRAC. We can link a specific bug ticket with test cases. It also supports and maintains multiple Test projects. Since it is a web-based tool, multiple users can access its functionality at the same time with their credentials and assigned roles.
Benefits of TestLink
- Supports Multiple Projects.
- Easy Test Cases import or export.
- Easy to integrate with many defect management tools.
- Automated Test cases execution through XML-RPC.
- Easy to filter test cases with keywords, version and Testcase ID.
- Can provide credentials to multiple users and assign roles to them.
- Easy to assign test cases to multiple users.
- Easy to generate Test plan and Test reports in various formats.
Important Note: If you want to try your hand at TestLink demo before installing or using it for your project, head to below demo page. All features are available in this online latest demo version:
=>Go to TestLink Online Demo here.
Login name: admin
- Apache Web server
Note: If you have System Admin assigned for your project you can ask the sysadmin to install this for your project and skip directly to “Creating a Test Project” step. (If you have time to do these installations I will suggest trying your hand at it. This will add to your experience. :) )
To install TestLink, You need to install Apache web server, PHP and MySQL server. If your system or server already has Apache, PHP and MySQL installed then you can directly install this tool as mentioned in “Installation of TestLink” section below.
Otherwise, follow below steps one by one to install Apache, PHP, and MySQL first.
Installation of Apache:
This section contains steps to be followed to install Apache web server.
Step – 1
Download Apache from here.
Step – 2
Extract the Zip file to C:/
Copy C:\Apache24\bin path and append this with path environment variable.
Step – 4
Open Command Prompt. (Run as administrator)
cd to C:/Apache24/bin and run the following commands one by one
httpd -k install
httpd -k start
Installation of PHP
This section contains steps to be followed to install PHP and configuring PHP with Apache.
Step – 1
Download php from this page (thread is safe).
Extract this to C:\php
Step – 2
Rename php.ini-development to php.ini
Add C:\php\ to path environment variable.
Edit php.ini and add/edit the following lines,
log_erros = On
doc_root = C:/Apache24/htdocs
extension_dir = “C:/php/ext”
Step – 5
Edit httpd.conf and add/edit the following lines,
LoadModule php5_module “C:/php/php5apache2_4.dll”
AddType application/x-httpd-php .php .html .php4 .php5
At the end of httpd.conf file add,
Step – 6
Create a file named phpinfo.php inside C:/Apache24/htdocs & add the following line inside the file.
Step – 7
Copy php-mysql.dll in C:/php/ext and put it inside C:/Windows/System32
Step – 8
Installation of MySQL
This section contains steps to be followed to install MySQL.
Step – 1
Download MySQL from this page and install it.
Step – 2
Create a Database named “testlink” in your MySQL server.
In php.ini uncomment MySQL extension.
And set date time zone as “PRC”.
Installation of TestLink
This section contains steps to be followed to install TestLink in Apache web server.
Step – 1
Download TestLink from this page.
Step – 2
Extract the package, rename it to “testlink” and put it inside “C:/Apache24/htdocs”
Step – 3
Edit config.inc.php and edit the following lines,
$tlCfg->log_path = ‘C:/Apache24/htdocs/testlink/logs/’;
$tlCfg->config_check_warning_mode = ‘SILENT’;
$g_repositoryPath = ‘C:/Apache24/htdocs/testlink/upload_area’;
Save the changes, and open http://localhost:80/testlink from the browser.
Click “next” button until installation completed.
Step – 4
Now you can log in to TestLink By accessing http://localhost:80/testlink.
Note: If you want screenshots for these installation steps please check this installation guide.
Creating a Test Project
Test Project is a project created for a specific product/project. It contains Test plans, Test suites, Test cases and Builds. We can maintain multiple projects in TestLink.
This section clearly explains how to create a Test project:
Step-1: Creating a new Test Project requires “admin” rights. (So login with admin user)
Step-2: When logging for the first time, it will directly navigate to Test project creation page. Otherwise, select “Test Project Management” link on the main page and click on “Create” button.
Step-3: Test Project section will be opened. Click on “Create” button.
Step-4: Enter Test Project name, description and all the required fields and click on “Create” button.
[Click to enlarge image]
Test project should be created successfully.
Creating Test plan
Test plan document contains complete information like the scope of testing, milestones, test suites and test cases. Once you’ve created a Test Project, Next step is creating a Test plan.
This section clearly explains creating Test plan:
Step-1: Click on “Test Plan Management” link on the desktop page.
Step-2: Click on “Create” button on the test plan management page.
Step-3: Enter all the required details in the page.
Step-4: Click on “Create” button. It should be saved.
The build is a specific release of the software.
This section clearly explains how to create a build:
Step-1: Click on “Builds/Releases” as shown in the figure.
Step-2: Click on “create” button.
Step-3: Enter the details about the build as shown in below figure and click on “Create” button.
The build should be created and saved.
Testsuite is a collection of test cases that may be validating/testing same component. This section clearly explains how to create a test suite. Follow the below steps one by one to create a Testsuite.
Step-1: Click on “Test specification” link on the Desktop. It should navigate to the Test specification page of the Project.
Step-3: Click on create a button for the Test suite.
Step-4: Test suite specification page should be opened. Fill the details related to the Test suite and click “Create Test suite” button.
The test suite will be created and appear on the left side, folder tree structure.
Creating a Testcase
Testcase contains a sequence of test steps to test a specific scenario, with an expected result. This section explains how to create a test case along with test steps. Follow the below steps one by one to create Test cases.
Step-1: Click on the Test suite folder on the left side tree structure
Step-3: Click on Test case “Create” button. It will open Test case specification page.
Step-4: Enter details in the Test case specification page.
Step-5: After entering the details, click on “Create” button. It will save the test case.
Step-6: Now click on the “Create steps” button in the test case. It will show test case step editor.
Step-7: Start adding the Test steps as shown in the picture.
Step-8: Click “Save” button to add further steps, or click “Save & exit” button to save step and exit from the editor.
Finally, test case we just created will look like this: [Click to enlarge image]
Assigning Testcase to Test Plan
To Execute a Test case, it should be assigned to a Test plan. This section describes how to assign a test case to a Test Plan. Follow the below-mentioned steps to assign a test case to a Test Plan.
Step-1: Click on the settings icon on the test case panel. It will display the list of operations.
Step-2: Click on “Add to TestPlans” button.
Step-3: Click on the check box of the test plan, to which you want to assign the test case. And then click on “Add” button.
The test case will be successfully added to the Test Plan.
That’s all for today.
Recap of what we learned in this tutorial:
- TestLink provides various functionality integrated such as documenting and executing test cases, Test report and Test plan generation.
- Multiple users with multiple roles can be defined in TestLink.
- It is a web-based test management tool, so everyone in the organization can browse test cases if they have valid login credentials.
- Test reports can be easily generated in HTML, MS DOC or Excel format.
- We can export all the test suites & Test cases and can import it into some other projects. This is very useful if we want to reuse existing test cases for next project versions.
Due to these useful features, TestLink is widely used and it has been the most popular open source test management tool since long.
About the author: Thanks to Anitha Eswari for helping us to craft these useful tutorials. She is currently working as a senior test engineer having sound knowledge on manual and automation testing and various test management tools.
In 2nd and 3rd parts of this series we will see how to manage requirements, map test cases to requirements, execute test cases manually, link defects, and generate test reports. In advanced part, we will see how to use Selenium WebDriver to update test cases automatically using TestLink API and save time and money which are important factors for the success of any project. :)
List of All Tutorials:
As usual, we are here to help you. Let us know your queries in comments below.