测试管理工具TestLink的使用(一)安装篇

/etc/yum.repos.d/centos-test.repo     TestLink作为开源测试管理工具,可以将测试需求、测试用例、测试计划集成在一起管理,并且可以做到和Jira、Mantis、Bugzilla等软件缺陷管理工具集成,是不错的开源测试管理工具。

 1、背景

  在CentOS5.4上安装PHPMyAdmin3.3.2+TestLink1.8.5

2、软件来源

TestLink   (TestLink网站http://sourceforge.net/projects/testlink/files/)

PHPMyAdmin (http://www.phpmyadmin.net/home_page/downloads.php

3、安装配置过程

(1)PHP升级

 CentOS5.4安装的php默认为5.1.6,PHPMyAdmin3.3.2需要PHP5.2以上支持

 升级方法:

 $vi  /etc/yum.repos.d/centos-test.repo

文本内容如下

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

保存后

$yum update php

  验证php升级成功:

 在/var/www/html目录下编辑测试文件test.php

$vi /var/www/html/test.php

<?

  phpinfo()

?>

保存文件,然后在浏览器输入http://IP/test.php即可看到php信息。

(2)phpMyAdmin安装

将phpMyAdmin解压到/var/www/html目录下

将config.sample.in.php复制粘贴后重命名为config.inc.php

解决浏览器访问http:.//IP/phpMyAdmin在网页上出现“mcrypt无法扩展”的告警信息

$yum install php-mcrypt

(3)TestLink安装

step1:解压到/var/www/html目录下

          chmod -R 777 /var/www/html/index.php 否则安装过程中会提示失败

          在浏览器输入http://localhost/testlink/install/index.php  New Install

 step2:在安装过程中系统会检查mysql的版本是否匹配当前要安装的testlink的版本

            $ls -l /etc/php.d (注:检查mysql*.so文件是否存在,若没有,说明没有安装php-mysql的一些支持)

            $yum install php-mysql (注:安装成功后,需要重启mysqld服务)

 step3: 在浏览器继续输入http://localhost/testlink/install/index.php  New Install

            Database login:root
            Database password:250100

            TestLink DB login:testlink  可自定义
            TestLink DB password:250100 可自定义

             Ok,安装成功
            访问testlink方法:http://Ip/testlink/index.php

 step4:TestLink配置

           解决中文支持问题:

                     装好的TestLink默认是英文,要支持中文,需要修改config.inc.php文件

                找到$g_default_language = ‘en_GB’; 修改为: $g_default_language = ‘zh_CN’

                     此外,对于admini的用户我们需要在用admin用户登录后修改,点击:个人帐号

                 然后在里面设置语言为Chinese Simplified,然后把上面的文件都修改。

            解决日期乱码问题:

                      修改config.inc.php最下面:

                   $g_locales_timestamp_format = arrry (‘zh_CN’ => “%Y-%m-%d  %H:%M:%S”,
             

           

 (4)TestLink和Jira的集成

   Step1:修改testlink/cfg/jira.cfg.php
    //Set the bug tracking system Interface to JIRA 4.0.1

    /** The DB host to use when connecting to the JIRA db */

   define('BUG_TRACK_DB_HOST', 'localhost');   #修改为jira所在机器(ip)


    /** The name of the database that contains the jira tables */

    define('BUG_TRACK_DB_NAME', 'jiradb'); #指定jira的数据库名称


    /** The DB type to use for connecting to the bugtracking db */

    define('BUG_TRACK_DB_TYPE', 'mysql'); #指定连接的数据库的类型

    /** The DB type being used by jira */

     define('BUG_TRACK_DB_USER', 'jirauser'); #指定数据库的用户名


    /** The DB password to use for connecting to the jira db */

    define('BUG_TRACK_DB_PASS', '123456'); #指定数据库的密码


    define('BUG_TRACK_DB_CHARSET',"windows-1250");

    // define('BUG_TRACK_DB_CHARSET',"gb2312");

    // define('BUG_TRACK_DB_CHARSET',"UTF-8"); #指定默认的字符集,我们jira里使用的是UTF-8,和jira保持相同。

    /** link of the web server for jira */

    // define('BUG_TRACK_HREF', "http://localhost:8080/secure/Dashboard.jspa");

    define('BUG_TRACK_HREF', "http://localhost:8080/browse/");  #指定访问jira的网址


Step2:修改testlink/config.inc.php
修改
/** [Bug Tracking systems] */
/**
* TestLink uses bugtracking systems to check if displayed bugs resolved, verified,
* and closed bugs. If they are it will strike through them*
* @var STRING TL_INTERFACE_BUGS = ['NO', 'BUGZILLA', 'MANTIS', 'JIRA', 'EVENTUM']
* NO        : no bug tracking system integration
* BUGZILLA  : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php
* MANTIS    : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php
* JIRA      : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
* TRACKPLUS : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php
* EVENTUM : edit configuration in TL_ABS_PATH/cfg/eventum.cfg.php
*/
 $g_interface_bugs='NO'; #把这里修改为JIRA,如果和mantis结合就写mantis.

          

猜你喜欢

转载自diansummer.iteye.com/blog/720369