Archive

Posts Tagged ‘testlink’

Install Testlink in Windows machine

March 6, 2012 2 comments

Testlink is an open-source management tool which includes test specification, planning, reporting, requirements tracking and collaborate with well-known bug trackers.

System Requirements:

• MySQL 4.1.x and higher
• php 4.3.x and higher
• Webserver (Apache 1.3.x or 2.0.x and higher, IIS 3 and higher, etc.)

Installation:

1. Download XAMPP for windows here. Latest version of xampp includes the following, one package that caters to the system requirements of Testlink.

  • Apache 2.2.21
  • MySQL 5.5.16
  • PHP 5.3.8
  • phpMyAdmin 3.4.5
  • FileZilla FTP Server 0.9.39
  • Tomcat 7.0.21

2. Double click xampp-installer.exe to start installation. From the installation wizard, under Service Section, install Apache, MYSQL, Filezilla as service

3. Select Testlink version to dowload here

4. Unzip testlink.tar file to your desired folder

5. Rename the folder to ‘testlink’ and copy it to your \xampp\htdocs folder (e.g. C:\xampp\htdocs\)

6. In your browser access http://localhost/testlink/install/index.php

7. Select New Installation

8. Provide Testlink admin and Database admin login creadentials

Testlink admin login/password – admin/admin (or whatever login/password you like)

Database admin login/password – root/<empty> (this is the default login/password of MYSQL for xampp)

9. After completing the installation, you can now access http://localhost/testlink/login.php and start using Testlink by logging in as admin/admin or creating a new user

Advertisements

Testlink Database SQL query

July 27, 2009 2 comments

Objective # 1: Filter all testcases under Globe Portal Capabilities testplan (testplan_id = ‘9007’) and include summary, steps and expected result in the query

testplan_tcversions

tcversions
field description
field description
id internal id for testcase versioning id unique id per testcase
testplan_id id that determines the testplan tc_external_id external id
tcversion_id unique id per testcase version latest version
node_order order of the node summary summary of testcase
urgency degree of urgency steps steps of testcase
expected_results expected result
importance degree of importance
author_id author
creation_ts date of creation
updater_id updater
modification_ts date of modification
active is active?
is_open is open?
execution_type type of execution 1-manual;2-automated

SQL query:


SELECT * FROM testplan_tcversions LEFT JOIN tcversions ON tcversions.id = testplan_tcversions.tcversion_id

WHERE testplan_tcversions.testplan_id = '9007'

Problem: Testcases have does not indicate its component/testsuite (Contacts, Search, Widgets etc.)

Objective # 2: Include Component(from nodes_hierarchy table) for each testcase in the query

nodes_hierarchy node_types
field description
field description
id unique id per testcase id id of node
name description / name description description of node
parent_id id of the parent node
node_type type of node node_types table
id description
1 testproject
2 testsuite=Component
3 testcase=Testcase Summary
4 testcase_version=Testcase Steps
5 testplan
6 requirement_spec
7 requirement

SQL query:


SELECT a.*,  b.*, c.parent_id, c.node_type FROM testplan_tcversions a LEFT JOIN tcversions b ON b.id = a.tcversion_id LEFT JOIN nodes_hierarchy c ON a.tcversion_id = c.id

WHERE testplan_tcversions.testplan_id = '9007'

Problem: parent_id for testcases with node_type = ‘4’ is not sufficient to get the testcase component/testsuite

e.g.

nodes_hierarchy
id parent_id node_type description value
9068 9067 4 testcase steps < steps >
9067 9010 3 testcase summary User can view his Contacts
9010 9006 2 testsuite/component Personalizations: Contacts
9006 1 testproject Gportal Capabilities

In our result query for id = ‘9068’, ‘9067’ will only give us the summary/title of the testcase but not its component/testsuite , our next objective is to get the parent_id of ‘9067’

Objective # 3: Include the parent_id of  each parent_id for all the testcases in the query. Just like the following

id parent_id parent_id2 name
9068 9067 9010 Personalizations: Contacts

To get the parent_id for each parent_id from the nodes_hierarchy table, we create a subquery:


SELECT x.id, x.name, x.node_type_id, x.parent_id, y.parent_id as parent_id2

FROM nodes_hierarchy x left join nodes_hierarchy y ON x.parent_id = y.id

Then add our subquery to our major query in Objective # 1:

SELECT a.*, b.*, d.*
FROM testplan_tcversions a
LEFT JOIN tcversions b on a.tcversion_id = b.id
LEFT JOIN (<em>select x.id, x.name, x.node_type_id, x.parent_id, y.parent_id as parent_id2 from nodes_hierarchy x left join nodes_hierarchy y on x.parent_id = y.id</em>) d on a.tcversion_id = d.id
WHERE a.testplan_id = '9007'

😀 Hats off Kuya Ed!

Categories: database Tags: , , , , ,

Running my Testlink Selenium scripts in IRB

May 22, 2009 1 comment

Here’s a simple documentation on how I execute my Testlink scripts via IRB:

1. Install the following in my local box:

  • Ruby and RubyGems
  • XAMPP
  • Testlink

2. Created the following ruby files located in the specified folder

..\project_folder\lib\testlink.rb –> An instance of selenium client driver for Testlink session

..\project_folder\lib\user.rb –> User class where methods pertaining to user is defined

..\project_folder\rakefile.rb –> File containing my rake tasks

3. Go To XAMPP Control Panel, start Apache  and MySql services

4. Launch Console and do the following

go to distribution file (d:\qa-training\gmangalo\lib)
run rake tasks (type rake –tasks OR rake -T)
start your server (type selenium:rc:start)
load your irb (type irb)
require your file (type require ‘user’)
create an instance of your session (type session_name = Session_class.new)

e.g. session = Testlink.new

create an instance of your user passing the created session (type user_name = User_class.new(session_name))

e.g. user = User.new(session)

start your session (type session_name.start)

e.g. session.start

go to URL’s login page (type session_name.open “URL PAGE”)

e.g. session.open “/testlink/login.php”

At this point I can now play around with the application via console using the methods defined.

Categories: selenium Tags: , , ,