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

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

In 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.

What you will learn in this TestLink Tutorial:

  • Creating Users and Assigning Roles
  • Writing Requirements
  • Assigning Requirements to Test case
  • Test Case Execution
  • Generating Test Reports
  • Export Test case/Test suite
  • Import Test case/Test suite

Let’s start.

TestLink tutorial 2

Creating Users and Assigning Roles in TestLink

TestLink restricts some access rights depending upon user roles. List of default roles defined in TestLink are discussed below.

Guest: who has rights 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 rights to create a Test plan.

Leader & Admin: both Test Lead and Admin have same rights such as view/modify/create/delete Test plan and Build, executing test cases, deleting a project, assigning user roles and permissions. In addition to that admin user has rights to modify product i.e. create, delete, and update project.

You can even create new custom roles with different permissions as shown in below image: (Click image to enlarge)

TestLink user rights

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

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

TL1

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

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

TL2

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

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

TL3

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

Writing Requirements

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 Requirements link on the navigation bar. It will navigate to Requirements page.

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

TL4

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

TL5

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

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

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

TL6

Assigning Requirement to Test case

Requirements can be linked to test cases in TestLink. This is 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 Test specification section.

TL7

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

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

TL8

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

Requirement gets successfully added to the test case.

Executing a Test case

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

------------

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 ad shown in below figure.

TL10

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

Click on image to enlarge.

TL11

Generating Test Reports

Test Reports are the evidence of Testing, TestLink provides 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 “Test Reports” link on the navigation bar. It will navigate to test reports page.

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

TL12

Step-3 : Select the contents to be added to the test report by checking the Check boxes.

TL13

Step-4: You can change the report format by changing the highlighted drop down value as shown in above figure.

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

TL14

Same way, you can generate Test plan report.

Export Test case/Test suite

Lets assume you are using TestLink and you have already created some projects under it.

What if you want to install TestLink in 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 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 different system or instance.

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

Follow below mentioned steps to export and import test cases:

Step-1: Select the Test case that you want to export in the Test specification page.

TL15

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

Step-3: Click “Export” button.

TL17

Step-4 : Check all the four check boxes, and click on “Export” button. It will export the selected test case in XML format and save it on your local drive. Same way we can export a Test suite also.

Importing Test case/Test suite

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

TL18

Step-2: 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 “Import” button in the test case operations list as shown in below figure:

TL19

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

TL20

Step-5: Test case will be uploaded and displayed on the left side panel.

Same way we can import a Test suite also.

Conclusion

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

In 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!




23 comments ↓

#1 Akreeti

this is very simple to understand. Does this tool also support defect tracking?

#2 Anitha Eswari

@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

#3 amit

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

Thanks,

#4 Deepesh

Thanks for this article. It was very useful.

#5 luasg

thanks for this article, it was very useful.

#6 ASW

Helpful article. Thanks :)

#7 Manjula

Looking forward to the 3rd article (integrate automated test execution into TestLink)

#8 Anitha Eswari

@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!!!

#9 Divya

Hi..can anybody tell me what is the role of SDLC and what testing methodology is used to test a website application.

#10 Komala

Hi.. can anybody tell me , how to export test cases to spreadsheet in test link tool.

#11 abhijit

Can i integrate testlink with any hardware,say any OMAP based board

#12 Raine

I was looking for report of test cases by created/updated date. Is it possible?

#13 Meenaxi

HI,

How can we have the Requirement coverage through Selenium.

Thanks.

Regards,
Meenaxi

#14 mashitha

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.?

#15 SAHANA

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

#16 Shiva

I was looking for report of test cases by created/updated date. Is it possible?

#17 Adhikansh Garg

Anyone please help me I want to upload multiple test cases in test link at the same time.

#18 Gaurav Khurana

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?

#19 Raafat

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.

#20 giriraj

how can i execute test cases by choosing automation in testlink?

#21 Srikanth

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.

#22 krushna

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.

#23 sayyuyi

is it possible TestLink generate graph or chart for each requirement ?

Leave a Comment