How to Manage Requirements, Execute Test Cases and Generate Reports Using TestLink – Tutorial #2

By Vijay

By Vijay

I'm Vijay, and I've been working on this blog for the past 20+ years! I’ve been in the IT industry for more than 20 years now. I completed my graduation in B.E. Computer Science from a reputed Pune university and then started my career in…

Learn about our editorial policies.
Updated September 20, 2024

This is Part 2 of the “Learning TestLink Test Management Tool” tutorial series. If you missed part-1 you can check it here: Getting started with the TestLink Test Management tool.

In the last tutorial, we learned TestLink installation, creating Test Plan, and writing Test Cases.

Today, let’s learn important features of TestLink, including requirements management, test case execution, and generating test reports.

TestLink Features: Requirements, Test Cases, Reports

_Manage Requirements, Execute Test Cases

Let’s start.

Creating Users And Assigning Roles In TestLink

TestLink restricts some access rights depending on user roles. A list of default roles defined in TestLink is discussed below:

  • Guest who has the right to only view test cases and metrics. They cannot edit or view anything apart from that.
  • Tester can execute test cases and view Test Metrics.
  • Senior Tester who can view, modify, create, and delete test cases. And they can also execute test cases and view metrics. But they have no right to create a Test Plan.
  • Leader & Admin both Test Lead and Admin have the same rights such as view/modify/create/delete. Test plan and Build, executing test cases, deleting a project, assigning user roles and permissions. Besides that admin user has the right to modify the product, i.e. create, delete, and update the project.

You can even create new custom roles with different permissions as shown in the below image: 

TestLink user rights

The below section clearly explains how to create a user and assign user rights. Follow these steps to create a user and assign user roles:

Step #1: Click on Users/Roles link in the TestLink navigation bar. It will navigate to the Users/Roles page.

TestLink navigation bar

Step #2: Click on the “Create” button on that page.

Step #3: Enter the username, user details, and role in the form displayed and click on the “Save” button.

Enter Details

Step #4: To assign a Test project role to a user, switch to the “Assign Test Project Roles” tab.

Step #5: Select the Project name and Role for the User from the drop-down, as shown in Fig.

Select details

Similarly, we can switch to the “Assign Test Plan Roles” tab and assign roles for users to a particular Test Plan.

Writing Requirements

The requirement is a constraint/need that the software should satisfy/perform.

This section clearly explains how to write requirements in TestLink:

Step #1: Click on the Requirements link on the navigation bar. It will navigate to the Requirements page.

Step #2: Click on the “Create” button on that page.

Requirements

Step #3: Enter the Document ID, Title, and Description of the requirement, as shown in the below figure, and click on the “Save” button.

Writing Requirements

Step #4: Requirement specification should be created and displayed on the left side panel.

Step #5: Click on the Requirements Operations “Create” button.

Step #6: Enter all the details as shown in the figure and click on the “Save” button.

Enter all the details

Assigning Requirement To Test Case

Requirements can be linked to test cases in TestLink. This is a very important feature to track test coverage based on requirements. In test reports, you can check which requirements are not covered and work on them to add in test suites for maximum test coverage.

This section explains how to assign a requirement to a test case:

Step #1: Open any one test case from the Test Specification section.

Test Specification section

Step #2: Click on the “Requirements” icon on the test case, as shown in the above figure. It will open the requirements dialogue.

Step #3: Select requirements specification from the drop-down box, and click on the requirement checkbox, as shown in the figure.

requirements specification

Step #4: Click on the “Assign” button. Now you can find the selected requirement in the assigned requirements section.

The requirement gets successfully added to the test case.

Executing A Test case

We can execute a test case and can change the execution status of a test case in TestLink. The status of a test case can be changed to “passed”, “failed” or “blocked”. Initially, the test case will be in the “not run” state, but once you update it, you cannot change its status back to “not run”.

Follow these steps to execute a test case:

Step #1: Click on the “Test Execution” link in the navigation bar. It will navigate to the Test Execution panel.

Step #2: Select the Test case you want to execute from the left side panel.

TL9

Step #3: Select the execution status (pass/fail/blocked), and then enter the test execution notes as shown in the below figure.

TL10

Step #4: Click on the “Save execution” button. It will update the Test case execution status as selected.

Save execution

Generating Test Reports

Test Reports are the evidence of Testing, TestLink provides a built-in feature to generate test reports in various formats such as HTML, MS Word, MS Excel, OpenOffice Writer, and OpenOffice Calc.

This section explains how to generate a Test report in TestLink. Follow these steps to generate a test report:

Step #1: Click on the “Test Reports” link on the navigation bar. It will navigate to the test reports page.

Step #2: Click on the “Test Report” link on the left side panel. As shown in Figure.

Test Report

Step #3: Select the contents to be added to the test report by checking the Checkboxes.

Select the contents

Step #4: You can change the report format by changing the highlighted dropdown value, as shown in the above figure.

Step #5: Click on the Test project folder structure, appearing on the right-side panel. The test report will be generated successfully.

Test project folder structure

Same way, you can generate the Test plan report.

Export Test Case/Test Suite

Let’s assume you are using TestLink and you have already created some projects under it.

What if you want to install TestLink on some other server and you want to have all the Test projects in your TestLink on that server?

Export test cases or test suites feature comes in handy in that case. You can simply export test projects/ test suites in your TestLink and then you can import them into another TestLink project on a different system, for instance.

Export/Import feature helps to avoid the overhead of writing all the test projects and test cases again.

Follow the below-mentioned steps to export and import test cases:

Step #1: Select the Test case you want to export on the Test specification page.

Test specification page

Step #2: Click on the settings icon onTL16 the right-side panel. It will display some test case operations.

Step #3: Click the “Export” button.

Export

Step #4: Check all four checkboxes, and click on the “Export” button. It will export the selected test case in XML format and save it on your local drive. In the same way, we can export a test suite as well.

Importing Test Case/Test Suite

Step #1: Select the Test suite folder inside which you want to import the Test case.

import the Test case

Step #2: When you click on the settings icon in the right-side panel, it will display all operations that can be performed on a Test case / Test suite.

Step #3: Click on the “Import” button in the test case operations list as shown below figure:

Import

Step #4: Browse and attach the XML test case file you’ve exported from TestLink and click on the “Upload file” button.

XML test case file

Step #5: The test case will be uploaded and displayed on the left side panel.

In the same way, we can import a test suite as well.

Conclusion

In this part, we have seen the only manual execution of test cases. TestLink also supports an API, through which we can easily update the test case execution status.

In the next and last part, we will see some advanced concepts like – updating test case execution status in TestLink remotely, i.e. through Selenium WebDriver code using TestLink API. After all, automating these small repetitive tasks can save us a lot of time in the end!

PREV Tutorial | NEXT Tutorial

Was this helpful?

Thanks for your feedback!

Recommended Reading

32 thoughts on “How to Manage Requirements, Execute Test Cases and Generate Reports Using TestLink – Tutorial #2”

  1. @Amit – To do that, first you should have bug zilla installed in your machine/ any other server.

    Go to issue tracker management link in your Testlink , and select type as bugzilla, and then add the following configuration code ,

    USERNAME
    PASSWORD
    http://bugzilla.mozilla.org/

    BUGZILLA PRODUCT
    BUGZILLA PRODUCT

    <!– COMMENTED SECTION
    There are defaults defined in bugzillaxmlrpcInterface.class.php.
    unspecified
    Trivial
    All
    Normal
    All –>

    Once you’ve defined everything, Go to Test Project section and check “Active” checkbox in issue tracker integration, and from the drop down select your bugzilla xmlrpc. Save the changes. you’re done!!!

    Reply
  2. when i am executing test cases the option to save execution button is not showing on my execution page as given on the above screen shots
    i am using TestLink Version 1.9.16
    Please adivise

    Reply
  3. can anyone plz tell me how to create an issue by using testlink and how can i log and track this bug to developer .
    please share me with step by step details.

    Reply
  4. @Akreeti – this tool doesnt have defect tracking feature, but you can integrate different defect tracking tools like bug zilla, jira, trac, mantis etc with testlink

    Reply
  5. Hi please explain how do i generate test report in excel format. currently its just shows html or ms word format for report generation

    Reply
  6. Hi

    After executing all test cases in test link, can we edit again those test cases. I mean if all the test cases passed if i want edit again any case.

    Please lem know is der any ways to edit again

    Version we are using-TestLink 1.9.16

    Reply
  7. Hii….. When i am trying to execute Test cases, Not able to view note/Description and Results Page.
    Can any one provide solution on how to resolve this issue.?

    Reply
  8. creating users
    assigning roles
    Easy way of adding requirement
    linking them to the test cases
    changing of status

    Can’t we have custom status for test cases? I mean to say to have statuses other than pass, fail, block?

    Reply
  9. Does this tool provide data migration from HPQC or any XML import.
    Is there any support provided for customization?

    Reply
  10. can you please explain me how to integrate different defect tracking tool to testlink.(please use bugzilla to integrate it).

    Thanks,

    Reply
  11. While executing with more than one step in test case the page is simply loading for long time and doesn’t execute.
    This is happening only with multiple steps.

    Reply
  12. Can any one help me for the following:
    1-I want to Link the requirements for the Test Plan, as i can link it to test case, but not all the requirement should has testcase
    2- when execute the test case have many cases inside, how to save the status for each cash individual
    3-after integrate testlink with Mantis, how to link specific bug with the case inside test case as i can report the bug link to the whole test case not a specific case.
    4-when try to assign user to test case and let testlink to send mail, it give me error in SMTP host, as i configure it and enter the SMTP server IP or Name and it not work.

    Reply

Leave a Comment