【Testlink】之Linux環境搭建

testlink作爲一款測試用例管理工具,同傳統的測試用例管理工具相比,具有如下特點:


  • 多人可協同工作,編輯完成後沒有格外的彙總、格式調整的工作量;

  • 用例可追溯性強,提供簡單的用例生命週期管理;

  • 提供需求覆蓋率;

  • 對任務的指派提供郵件提醒功能;

  • 有自動生成用例的功能;

  • 可以缺陷管理工具集成,便於統計用例;

  • 免費,開源;



軟件環境:

  • CentOS 6.5 ;

  • testlink 1.9.12;

  • xampp-linux-x64-5.6.3 ;

        1.1.   下載testlink


1.執行命令:

wget http://sourceforge.net/projects/testlink/files/TestLink%201.9/TestLink%201.9.12/testlink-1.9.12.tar.gz

wget  http://sourceforge.net/projects/testlink/files/TestLink%201.9/TestLink%201.9.0/testlink-1.9.0.zip


        1.2.   安裝testlink

1.解壓testlink

tar –zvxf testlink-1.9.12.tar.gz

unzip -d /tmp testlink-1.9.0.zip

2.執行命令

mkdir /opt/lamp/htdocs/testlink

mv   /tmp/testlink-1.9.12 /opt/lampp/htdocs/testlink

mv   /tmp/testlink_1.9.0 /opt/lampp/htdocs/testlink

3.執行命令

cd /opt/lampp/htdocs/testlink

chmod 777 gui/templates_c

chmod 777 logs

chmod 777 upload_area

4.訪問http://<IP>/testlink/install/index.php地址,如下圖

c750c1561fd009dbf8b1bf5b5d63f765.png

5.點擊【NewInstallation】

940309555a20cfbf5b0c82d8d867d99b.png

6. 在彈出的頁面,勾選”I agree to the terms set out in this licence.”,點擊【continue】。

cb40182957c38393a42ef7094710e2e0.png

安裝過程中報錯:

Checking if /var/testlink/logs/ directory exists [S] </B<< td>    Failed!
        Checking if/var/testlink/upload_area/ directory exists [S] </B<< td>  Failed!

解決方法:
  修改/opt/lampp/htdocs/testlink/config.inc.php文件:
//$tlCfg->log_path = '/var/testlink/logs/'; /* unix example  註釋掉該句

此處修改爲:

$tlCfg->log_path ='/opt/lampp/htdocs/testlink/logs/';

$g_repositoryPath='/opt/lampp/htdocs/testlink/upload_area/';

 

Writing configuration file:Failed!

TestLink couldn't write the config file.Please copy the following into the ../config_db.inc.php file:

<?php

// Automatically Generated by TestLinkInstaller - Mon, 14 Apr 14 06:08:53 +0200

define('DB_TYPE', 'mysql');

define('DB_USER', 'root');

define('DB_PASS', '111111');

define('DB_HOST', 'localhost');

define('DB_NAME', 'testlink');

define('DB_TABLE_PREFIX', '');
Once that's been done, you can log into TestLink by pointing your browser atyour TestLink site.

7. 重新訪問http://<IP>/testlink/install/index.php,點擊【NewInstallation】,勾選”I agreeto the terms set out in this licence.”,點擊【continue】。

0e96de7343770bdef83767932cdbd9f2.png


8. 在新頁面,點擊【continue】,在新頁面,直接點擊【process testlink setup】

17499f6ea0f6ff98cd1cdb1d97fe4832.png


10. 執行以下命令,修改配置文件

cd /opt/lampp/htdocs/testlink

vi config_db.inc.php

 將以下內容,添加到config_db.inc.php 文件中

<?php

//  Automatically Generated by TestLink Installer - Mon, 09 Feb 15 07:44:16 +0100

define('DB_TYPE',  'mysql');

define('DB_USER',  'testlink');

define('DB_PASS',  'testlink');

define('DB_HOST',  'localhost');

define('DB_NAME',  'testlink');

define('DB_TABLE_PREFIX', '');

 

11.修改config_db.inc.php的權限及屬主

chmod 777 config_db.inc.php

chown 1000:daemon config_db.inc.php

12.訪問http://<IP>/testlink/login.php.

1.3   漢化testlink系統

  1. 打開配置文件

    vi /opt/lamp/htdocs/testlink/config.inc.php

  2. 修改以下內容:

    //$tlCfg->default_language = 'en_GB';

    $tlCfg->default_language =  'zh_CN'; 

  3.  個人設置漢化的步驟:

  4. 登錄Testlink 後,點擊My Settings,選擇Chinese Simplified即可使用中文


    1.4.   設置安全告警

    1.你需要注意一些安全警告. 查看詳細信息在文件: /opt/lampp/htdocs/testlink/logs/config_check.txt.

    2.要禁用警告輸出,設置 $tlCfg->config_check_warning_mode ='SILENT';

    254d106f1adda28a56d798adbd3d074a.png3.打開Testlink安裝文件夾下的config.inc.php文件,將$tlCfg->config_check_warning_mode = 'FILE';中的FILE改爲SILENT 保存!再刷新頁面,已無提示!

1.5  Testlink郵件配置

vi /opt/lamp/htdocs/testlink/config.inc.php

在config.inc.php中配置testlink的郵件,將配置中關於郵件配置重複的部分註銷。

$g_smtp_host = 'smtp.ym.163.com';

$g_tl_admin_email = '[email protected]';

$g_return_path_email = ' '[email protected]  ';

$g_from_email = ' '[email protected]  ';

$g_smtp_username = ' '[email protected]  '; # user

$g_smtp_password = 'testlink.admin'; #  password

define ("SMTP_SEND",2);

$g_phpMailer_method ='SMTP_SEND';

測試用戶密碼重置,郵件測試成功。

至此testlink的搭建工作已經完成,可以添加用戶,設置角色權限投入使用啦!




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章