文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>mantis+testlink安装配置

mantis+testlink安装配置

时间:2010-09-14  来源:freyson

Mantis+testlink+subversion

一、首先安装mantis

我们这里用最新的版本,1.18版。目前来说1.2.0还在测试阶段,我们使用成熟的版本1.1.8版。

下载地址 http://www.mantisbt.org

Mantis和testlink都属于开源项目,都是基于LAMP的基础上来做的,所以我们前提是安装,Linux、apache、mysql、php,这里就不说,LAMP的安装了,在我以前的文章中写过他们的安装。我主要说这些开源项目的安装配置和使用。

Gd库要支持freetype  GIF   JPG   PNG

下载后上传到服务器,解压,安装,配置

Tar –zvxf  mantisbt-1.1.8.tar.gz

Mv mantisbt-1.1.8 /usr/local/apache/htdocs/mantis

在浏览器中打开页面:

http://IP/mantis 出来安装界面。安装界面可以按照一步一步的来,主要就是设置数据库连接和查看php的扩展模块。:

创建数据库,/usr/local/mysql/bin/mysql –uroot –p 密码

 Mysq>create database bugtracker;

Mysql> grant on bugtracker.* to ‘mantis’@’localhost’ identified by ‘666666’;

Mysql>flush privileges;

Mysql>\q

 

Cd /usr/local/apache/htdocs/mantis

Cp config_inc.php.sample  config_inc.php

Vi config_inc.php

 

 

修改成如下内容:

# --- database variables ---------

 

       # set these values to match your setup

       $g_hostname      = "localhost";

       $g_db_username   = "mantis";

       $g_db_password   = "666666";

       $g_database_name = "bugtracker";

       $g_db_type       = "mysql";

        $g_default_language = 'chinese_simplified';

        $g_fallback_language = 'chinese_simplified';

        $g_use_jpgraph   = ON;

        $g_graph_path    = '/usr/local/jpeg6/';

        $g_window_title  = 'Software FU Manager';

        $g_page_title    = 'Software FU Manager';

        $g_path          = "http://192.168.7.238/mantisbt/";

        $g_icon_path     = $g_path."images/";

        $g_absolute_path = "/usr/local/apache/htdocs/mantisbt/";

        $g_use_show_version = ON;

        $g_use_iis          = OFF;

 

再增加邮件设置:

       # --- email variables -------------

       $g_administrator_email  = '[email protected]';

       $g_webmaster_email      = '[email protected]';

 

       # the "From: " field in emails

       $g_from_email           = '[email protected]';

 

       # the return address for bounced mail

       $g_return_path_email    = '[email protected]';

 

        $g_enable_email_notification = ON;

 

        # select the method to mail by:

        # 0 - mail()

        # 1 - sendmail

        # 2 - SMTP

        $g_phpMailer_method       = 2;

        $g_smtp_host              = 'mail.xxxx.com.cn';

        $g_smtp_username          = 'freyson';

        $g_smtp_password          = 'xxxxx';

        $g_charSet                 = 'gb2312';

 

       # --- file upload settings --------

       # This is the master setting to disable *all* file uploading functionality

       #

       # The default value is ON but you must make sure file uploading is enabled

       #  in PHP as well.  You may need to add "file_uploads = TRUE" to your php.ini.

       $g_allow_file_upload     = ON;

现在基本的设置就算ok了,从页面打开http://IP/mantis 直接用管理员帐号登录就可以了。

Mantis的默认帐号是administrator 密码:admin

 

二、testlink的安装配置

我这里也认为是已经安装好了LAMP,直接下载testlink文件。

http://testlink.sourceforge.net/docs/testLink.php

我们下载成熟版的1.7.5版本

上传到服务器,看是解压,安装,配置

Tar –zvxf SNAPSHOP-branch_testlink_1_7-2009-08-21.tar.bz2

Cd testlink_1.7_export  /usr/local/apahce/htdocs/testlink

在浏览器里打开页面http://IP/testlink/

1)  直接在页面点击“New Installtion”

2)  在打开的页面中设置mysql数据库和testlink数据库的访问权限设置;

Database  Type  Mysql

Database  host  localhost

//配置访问Mysql的地址;

Database  login  testlink

Database  password  111111

//配置访问mysql的访问权限;

TestLink  DB  login  testlink

TestLink  DB  password  111111

//配置访问testlink的数据库权限;

 

3)  点击“同意许可协议”,继续

4)  这里会有一个错误,不能创建文件,所以我们要给testlink可写入的权限。

 Chmod –R 777 testlink/

安装完成,点击最后一行的(Please Click Me!)

5)  在testlink第一次安装成功后,默认管理员帐号为admin, 密码admin,可以登录。

6)  目前程序使用的是英文,我们把它改为中文。修改config.inc.php文件

找到$g_default_language = ‘en_GB’;

$g_default_language = ‘zh_CN’;

7)但是有一点,对于admini的用户我们需要在用admin用户登录后修改,点击:个人帐号

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

改config.inc.php最下面,解决日期乱码问题。

$g_locales_timestamp_format = arrry (

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

); 

这个我加上后出现程序出错,所以不知道为什么

 

三、整合

1.配置TestLink 下的 config.inc.php          

config.inc.php
 1 /**//** [Bug Tracking systems] */
 2 /**//** 
 3  * TestLink uses bugtracking systems to check if displayed bugs resolved, verified, 
 4  * and closed bugs. If they are it will strike through them
 5  *
 6  * @var STRING g_interface_bugs = [
 7  * 'NO'        : no bug tracking system integration (DEFAULT)
 8  * 'BUGZILLA'  : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php
 9  * 'MANTIS'    : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php
10  * 'JIRA'      : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
11  * 'TRACKPLUS' : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php
12  * 'EVENTUM'   : edit configuration in TL_ABS_PATH/cfg/eventum.cfg.php
13  * 'SEAPINE'   : edit configuration in TL_ABS_PATH/cfg/seapine.cfg.php
14  * 'GFORGE'    : edit configuration in TL_ABS_PATH/cfg/gforge.cfg.php
15  * 'FOGBUGZ'   : edit configuration in TL_ABS_PATH/cfg/fogbugz.cfg.php
16  * ]
17  */
18 $g_interface_bugs = 'MANTIS';        /**//*---将'NO'改成'MANTIS'---*/


      2.配置cfg下的Mantis.cfg.php

mantis.cfg.php
 1 <?php
 2 /**
 3 * TestLink Open Source Project - http://testlink.sourceforge.net/ 
 4 * $Id: mantis.cfg.php,v 1.7 2007/03/05 18:22:04 franciscom Exp $ 
 5 * 
 6 * Constants used throughout TestLink are defined within this file
 7 * they should be changed for your environment
 8 * 
 9 * 20051229 - scs - added DEFINE for the DB-Type
10 */
11
12 //Set the bug tracking system Interface to MANTIS 0.19.1
13 //also tested with MANTIS 1.0.0.a3
14
15 /** The DB host to use when connecting to the mantis db */
16 define('BUG_TRACK_DB_HOST', 'localhost');   //数据库服务器地址
17
18 /** The name of the database that contains the mantis tables */
19 define('BUG_TRACK_DB_NAME', 'mantis');      //Mantis数据库名称
20
21 /** The DB type being used by mantis 
22 values: mysql,mssql,postgres
23 */
24 define('BUG_TRACK_DB_TYPE', 'mysql');       //Mantis采用数据库类型
25
26 /** The DB password to use for connecting to the mantis db */
27 define('BUG_TRACK_DB_USER', 'mantis');      //数据库mantis的用户名
28 define('BUG_TRACK_DB_PASS', 'mantis');      //数据库mantis的密码
29
30
31 /* link of the web server for mantis*/
32 /* anonymous login into mantis has to be turned on, and a mantis user has to created with viewer rights to all public projects
33 /* Change the following in your mantis config_inc.php (replace dummy with your created user)
34      # --- anonymous login -----------
35     # Allow anonymous login
36     $g_allow_anonymous_login    = ON;
37     $g_anonymous_account        = 'dummy';
38 */
39 define('BUG_TRACK_HREF', "http://192.168.0.8:8080/mantis/view.php?id="); //提交bug号地址
40
41 /** link to the bugtracking system, for entering new bugs */
42 define('BUG_TRACK_ENTER_BUG_HREF',"http://192.168.0.8:8080/mantis/"); //TestLink的Mantis链接地址
43 ?>


      经过这两步,配置成功,来看一下整合前后的区别:


      1.整合前,在TestLink上执行测试用例Failed的界面


      2.整合后,在TestLink上执行测试用例Failed的界面


      可以明显看出来多了一个 BUG management,点下面的小蜘蛛,会打开一个新的页面


      
      通过 Access to Bug Tracking System (Mantis) 这个链接打开Mantis,进行bug登记,登记完毕,记下此时的bug号,填写进Mantis Bug id里,点 Add bug 按钮,整个过程完成,最终会在TestLink里显示出Mantis登记的bug信息。

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载