Chuyện của sys

DevOps Blog

Hướng dẫn cài đặt TestLink Test Management Tool July 9, 2017

Testlink là gì?

Test-link is most widely used web based open source test management tool. It synchronizes both requirements specification and test specification together. User can create test project and document test cases using this tool. With Test-Link you can create an account for multiple users and assign different user roles. Admin user can manage test cases assignment task.
It supports both automated and manual execution of Test cases. The testers can generate Test Plan and Test Report in a fraction of the time with this tool. It supports test reports in various formats like Excel, MS word, and HTML formats. Apart from these, it also supports integration with many popular defect tracking system like JIRA, MANTIS, BUGZILLA, TRAC, etc. Since it is a web based tool, multiple users can access its functionality at the same time with their credentials and assigned roles. 
Tóm lại, Testlink là 1 công cụ hữu ích cho QA/Tester quản lý các testcase của mình, hỗ trợ cả tự động và manual, có thế kết với các công cụ tracking khác như JIRA, BUGZILLA…

TestLink Stable (NEW!!!! – 1.9.16 – Moka Pot – 20170121)

Vào thời điểm hiện tại thì bản 1.9.16 vẫn là bản Stable, hóng chờ bản 2.x nhưng có vẻ cộng đồng càng lúc càng ít người sử dụng cũng như xây dựng phiên bản mới 🙂
Việc cài đặt Testlink khá đơn giản và có tài liệu hướng dẫn khá rõ ràng, chỉ cần thực hiện step by step là có thể có 1 tool sau vài phút.
Sau đây mình sẽ hướng dẫn cài đặt bản 1.9.16 trên Centos 7
Để chạy được Testlink thì cần có những thành phần sau: database (mysql, mariadb…), php, và nginx là web server.
Thông tin:
php -version
PHP 5.6.30 (cli) (built: Jan 19 2017 22:31:39)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
MySQL Server version: 10.1.21-MariaDB MariaDB Server
/zserver/nginx/sbin/nginx -v
nginx version: nginx/1.10.0
Download: https://sourceforge.net/projects/testlink/files/TestLink%201.9/TestLink%201.9.16/testlink-1.9.16.tar.gz
tar -xvzf testlink-1.9.16.tar.gz
mv testlink-1.9.16 /zserver/
Tạo database trên mysql và chạy câu lệnh tạo database
Create a new empty MySQL database.
CREATE DATABASE testlink CHARACTER SET utf8 COLLATE utf8_general_ci;
Create user to access
GRANT ALL PRIVILEGES ON *.* TO ‘testlink’@’lab4’ identified by ‘test123’;
Install the sql into the newly created database.
mysql -u testlink -h lab4 -p testlink < /zserver/testlink-1.9.16/install/sql/mysql/testlink_create_tables.sql
mysql -u testlink -h lab4 -p testlink < /zserver/testlink-1.9.16/install/sql/mysql/testlink_create_default_data.sql
Taọ file config để chứa thông tin kết nối đến database
Config database
cat /zserver/testlink-1.9.16/config_db.inc.php

<?php // Automatically Generated by TestLink Installer

define(‘DB_TYPE’, ‘mysql’);
define(‘DB_USER’, ‘testlink’);
define(‘DB_PASS’, ‘test123’);
define(‘DB_HOST’, ‘lab4’);
define(‘DB_NAME’, ‘testlink’);
?>
Tạo thư mục để chứa logs và upload
mkdir -p /var/testlink/logs/
mkdir -p /var/testlink/upload_area/
Chú ý:
On Linux or UNIX you must change the permissions of the templates_c directory to be writable by the webserver. From the TestLink root directory run
chmod 777 gui/templates_c
Chạy php dưới user nginx.
chown -R nginx. /var/lib/php/session/
Cấu hình nginx: vi /zserver/nginx/conf/vhost/testlink.conf

server {
listen 8081;
server_name lab4;
root /zserver/testlink-1.9.16;
client_max_body_size 20M;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/zserver/tmp/php-fpm.sock;
fastcgi_read_timeout 300;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ /\.ht {
deny all;
}
}

Như vậy là đã cài đặt xong, bạn có thể login vào tool bằng link sau:
Try :http://lab4:8081/login.php
Login : admin/admin
 

Categories: Tài liệu

Leave a Reply to Joseph Cancel reply

Your email address will not be published. Required fields are marked *